Class: Smithy::ContentsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Smithy::ContentsController
- Defined in:
- app/controllers/smithy/contents_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/smithy/contents_controller.rb', line 17 def create @content = Smithy::Content.new(filtered_params) @content.save flash.notice = "Your content was created" if @content.persisted? respond_with @content end |
#destroy ⇒ Object
35 36 37 38 39 |
# File 'app/controllers/smithy/contents_controller.rb', line 35 def destroy @content = Smithy::Content.find(params[:id]) @content.destroy respond_with @content end |
#edit ⇒ Object
24 25 26 27 |
# File 'app/controllers/smithy/contents_controller.rb', line 24 def edit @content = Smithy::Content.find(params[:id]) respond_with @content end |
#new ⇒ Object
12 13 14 15 |
# File 'app/controllers/smithy/contents_controller.rb', line 12 def new @content = Smithy::Content.new(filtered_params) respond_with @content end |