Class: FeaturerWeb::FeaturesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- FeaturerWeb::FeaturesController
- Defined in:
- app/controllers/featurer_web/features_controller.rb
Instance Attribute Summary
Attributes inherited from ApplicationController
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
19 20 21 |
# File 'app/controllers/featurer_web/features_controller.rb', line 19 def create update_and_redirect end |
#destroy ⇒ Object
23 24 25 26 27 |
# File 'app/controllers/featurer_web/features_controller.rb', line 23 def destroy Featurer.delete(params[:id]) head 200 end |
#edit ⇒ Object
11 12 13 |
# File 'app/controllers/featurer_web/features_controller.rb', line 11 def edit render locals: { feature: Feature.by_name(params[:id]) } end |
#index ⇒ Object
3 4 5 |
# File 'app/controllers/featurer_web/features_controller.rb', line 3 def index render locals: { collection: Feature.all } end |
#new ⇒ Object
7 8 9 |
# File 'app/controllers/featurer_web/features_controller.rb', line 7 def new render locals: { feature: Feature.new } end |
#update ⇒ Object
15 16 17 |
# File 'app/controllers/featurer_web/features_controller.rb', line 15 def update update_and_redirect end |