aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin/blog/comments_controller.rb2
-rw-r--r--app/controllers/admin/blog/posts_controller.rb2
-rw-r--r--app/models/blog_post.rb2
-rw-r--r--app/views/blog/posts/index.rss.builder2
-rw-r--r--app/views/blog/posts/show.html.erb2
5 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/admin/blog/comments_controller.rb b/app/controllers/admin/blog/comments_controller.rb
index 709d86d..0dc1db5 100644
--- a/app/controllers/admin/blog/comments_controller.rb
+++ b/app/controllers/admin/blog/comments_controller.rb
@@ -2,7 +2,7 @@ class Admin::Blog::CommentsController < Admin::BaseController
crudify :blog_comment,
:title_attribute => :name,
- :order => 'created_at DESC'
+ :order => 'published_at DESC'
def index
@blog_comments = BlogComment.unmoderated
diff --git a/app/controllers/admin/blog/posts_controller.rb b/app/controllers/admin/blog/posts_controller.rb
index 402748e..bd5dd49 100644
--- a/app/controllers/admin/blog/posts_controller.rb
+++ b/app/controllers/admin/blog/posts_controller.rb
@@ -2,7 +2,7 @@ class Admin::Blog::PostsController < Admin::BaseController
crudify :blog_post,
:title_attribute => :title,
- :order => 'created_at DESC'
+ :order => 'published_at DESC'
before_filter :find_all_categories,
:only => [:new, :edit, :create, :update]
diff --git a/app/models/blog_post.rb b/app/models/blog_post.rb
index a9fe8c2..659ef48 100644
--- a/app/models/blog_post.rb
+++ b/app/models/blog_post.rb
@@ -10,7 +10,7 @@ class BlogPost < ActiveRecord::Base
has_friendly_id :title, :use_slug => true
- default_scope :order => "created_at DESC"
+ default_scope :order => "published_at DESC"
if Rails.version < '3.0.0'
named_scope :live, lambda { {:conditions => ["published_at < ? and draft = ?", Time.now, false]} }
diff --git a/app/views/blog/posts/index.rss.builder b/app/views/blog/posts/index.rss.builder
index d9ad0da..51fa4da 100644
--- a/app/views/blog/posts/index.rss.builder
+++ b/app/views/blog/posts/index.rss.builder
@@ -9,7 +9,7 @@ xml.rss :version => "2.0" do
xml.item do
xml.title post.title
xml.description post.body
- xml.pubDate post.created_at.to_s(:rfc822)
+ xml.pubDate post.published_at.to_s(:rfc822)
xml.link blog_post_url(post)
end
end
diff --git a/app/views/blog/posts/show.html.erb b/app/views/blog/posts/show.html.erb
index ed2c082..84b35ca 100644
--- a/app/views/blog/posts/show.html.erb
+++ b/app/views/blog/posts/show.html.erb
@@ -11,7 +11,7 @@
<% content_for :body_content_left do %>
<p class='posted_at'>
- <%= t('blog.shared.posts.created_at', :when => @blog_post.created_at.strftime('%d %B %Y')) %>.
+ <%= t('blog.shared.posts.created_at', :when => @blog_post.published_at.strftime('%d %B %Y')) %>.
<% if (categories = @blog_post.categories).any? %>
<span class='filed_in'>