Previously I ordered my posts as this:
@posts = Post.find(:all, :order => \"created_at DESC\")
But now I want to replace created_at
created_at
in rails 3 we can do this as: Post.order("custom_method DESC") When upgrading app from rails2 to rails3
Post.order("custom_method DESC")