Class: Admin::BlogsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Admin::BlogsController
- Defined in:
- app/controllers/admin/blogs_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/admin/blogs_controller.rb', line 15 def create @blog = Blog.new(params[:blog]) if @blog.save flash[:notice] = 'Successfully set up the blog.' redirect_to admin_blog_path(@blog) else render :action => 'new' end end |
#edit ⇒ Object
25 26 |
# File 'app/controllers/admin/blogs_controller.rb', line 25 def edit end |
#index ⇒ Object
6 7 |
# File 'app/controllers/admin/blogs_controller.rb', line 6 def index end |
#new ⇒ Object
12 13 |
# File 'app/controllers/admin/blogs_controller.rb', line 12 def new end |
#show ⇒ Object
9 10 |
# File 'app/controllers/admin/blogs_controller.rb', line 9 def show end |
#update ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'app/controllers/admin/blogs_controller.rb', line 28 def update if @blog.update_attributes(params[:blog]) flash[:notice] = 'Successfully modified the blog.' redirect_to admin_blog_path(@blog) else render :action => 'edit' end end |