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
permalink #create ⇒ Object
[View source]
21 22 23 24 25 |
# File 'app/controllers/blogg/posts_controller.rb', line 21 def create @post = Post.new(params[:post]) @post. = current_user create!(notice: 'Blog post was successfully created.') end |
permalink #destroy ⇒ Object
[View source]
13 14 15 |
# File 'app/controllers/blogg/posts_controller.rb', line 13 def destroy destroy!(notice: 'Blog post was successfully deleted.') end |
permalink #update ⇒ Object
[View source]
17 18 19 |
# File 'app/controllers/blogg/posts_controller.rb', line 17 def update update!(notice: 'Blog post was successfully updated.') end |