Class: Blogg::PostsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Blogg::PostsController
- Defined in:
- app/controllers/blogg/posts_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
20 21 22 23 24 |
# File 'app/controllers/blogg/posts_controller.rb', line 20 def create @post = Post.new(params[:post]) @post. = current_user create!(:notice => "Blog post was successfully created.") end |
#destroy ⇒ Object
12 13 14 |
# File 'app/controllers/blogg/posts_controller.rb', line 12 def destroy destroy!(:notice => "Blog post was successfully deleted.") end |
#update ⇒ Object
16 17 18 |
# File 'app/controllers/blogg/posts_controller.rb', line 16 def update update!(:notice => "Blog post was successfully updated.") end |