Class: Detour::FeaturesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Detour::FeaturesController
- Defined in:
- app/controllers/detour/features_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/detour/features_controller.rb', line 2 def create @feature = Detour::Feature.new(params[:feature]) if @feature.save flash[:notice] = "Your feature has been successfully created." render "detour/shared/success" else @model = @feature render "detour/shared/error" end end |
#destroy ⇒ Object
14 15 16 17 18 19 |
# File 'app/controllers/detour/features_controller.rb', line 14 def destroy @feature = Detour::Feature.find(params[:id]) @feature.destroy flash[:notice] = "Feature #{@feature.name} has been deleted." redirect_to flags_path(params[:flaggable_type]) end |