Class: Wheel::ConfigsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Wheel::ConfigsController
- Defined in:
- app/controllers/wheel/configs_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/wheel/configs_controller.rb', line 13 def create @config = Config.new(config_params) if @config.save Wheel.reload redirect_to configs_path, notice: 'Config was successfully created.' else render :new end end |
#destroy ⇒ Object
39 40 41 42 43 44 45 |
# File 'app/controllers/wheel/configs_controller.rb', line 39 def destroy @config = Config.find(params[:id]) @config.destroy Wheel.reload redirect_to configs_path, notice: 'Config was successfully deleted.' end |
#edit ⇒ Object
24 25 26 |
# File 'app/controllers/wheel/configs_controller.rb', line 24 def edit @config = Config.find(params[:id]) end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/wheel/configs_controller.rb', line 5 def index @configs = Config.order(:key) end |
#new ⇒ Object
9 10 11 |
# File 'app/controllers/wheel/configs_controller.rb', line 9 def new @config = Config.new end |