Class: Railspress::Admin::TagsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Railspress::Admin::TagsController
- Defined in:
- app/controllers/railspress/admin/tags_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/controllers/railspress/admin/tags_controller.rb', line 14 def create @tag = Tag.new(tag_params) if @tag.save redirect_to , notice: "Tag created." else render :new, status: :unprocessable_entity end end |
#destroy ⇒ Object
34 35 36 37 |
# File 'app/controllers/railspress/admin/tags_controller.rb', line 34 def destroy @tag.destroy redirect_to , notice: "Tag deleted." end |
#edit ⇒ Object
23 24 |
# File 'app/controllers/railspress/admin/tags_controller.rb', line 23 def edit end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/railspress/admin/tags_controller.rb', line 6 def index @tags = Tag.ordered end |
#new ⇒ Object
10 11 12 |
# File 'app/controllers/railspress/admin/tags_controller.rb', line 10 def new @tag = Tag.new end |
#update ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/controllers/railspress/admin/tags_controller.rb', line 26 def update if @tag.update(tag_params) redirect_to , notice: "Tag updated." else render :edit, status: :unprocessable_entity end end |