Sha256: 99e1cff99636d12fba016d20e8b04f5420466d7b14c075a42cd472b7ac72a5b1
Contents?: true
Size: 393 Bytes
Versions: 16
Compression:
Stored size: 393 Bytes
Contents
class BlogsController < InheritedResources::Base load_and_authorize_resource def index @blogs = Blog.find(:all,:order=>'created_at desc') end def create @blog = Blog.new(params[:blog]) @blog.user =current_user if @blog.save flash[:notice] = "Successfully created blog." redirect_to @blog else render :action => 'new' end end end
Version data entries
16 entries across 8 versions & 1 rubygems