diff options
Diffstat (limited to 'app/views/blogs')
-rw-r--r-- | app/views/blogs/index.atom.builder | 15 | ||||
-rw-r--r-- | app/views/blogs/index.html.haml | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/app/views/blogs/index.atom.builder b/app/views/blogs/index.atom.builder new file mode 100644 index 0000000..dd498c8 --- /dev/null +++ b/app/views/blogs/index.atom.builder | |||
@@ -0,0 +1,15 @@ | |||
1 | atom_feed do |feed| | ||
2 | feed.title("Four Island") | ||
3 | feed.updated(@blogs[0].published_at) if @blogs.length > 0 | ||
4 | |||
5 | @blogs.each do |blog| | ||
6 | feed.entry(blog) do |entry| | ||
7 | entry.title(blog.title) | ||
8 | entry.content(blog.body, type: 'html') | ||
9 | |||
10 | entry.author do |author| | ||
11 | author.name("hatkirby") | ||
12 | end | ||
13 | end | ||
14 | end | ||
15 | end | ||
diff --git a/app/views/blogs/index.html.haml b/app/views/blogs/index.html.haml new file mode 100644 index 0000000..a1ad64c --- /dev/null +++ b/app/views/blogs/index.html.haml | |||
@@ -0,0 +1,3 @@ | |||
1 | - @blogs.each do |blog| | ||
2 | = render blog | ||
3 | = will_paginate @blogs | ||