Class: HerokuConfigVars::HerokuAppsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- HerokuConfigVars::HerokuAppsController
- Defined in:
- app/controllers/heroku_config_vars/heroku_apps_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/controllers/heroku_config_vars/heroku_apps_controller.rb', line 10 def create @heroku_app = HerokuApp.new params[:heroku_app] if @heroku_app.save redirect_to heroku_app_path else render :new end end |
#new ⇒ Object
6 7 8 |
# File 'app/controllers/heroku_config_vars/heroku_apps_controller.rb', line 6 def new @heroku_app = HerokuApp.find end |
#update ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/heroku_config_vars/heroku_apps_controller.rb', line 19 def update vars = params[:heroku_app][:vars] vars.merge! hashify_new_vars vars.except! *params[:remove].keys if params[:remove] heroku_app.vars = vars return render :confirmation unless params[:confirmation] if heroku_app.save redirect_to edit_heroku_app_path, notice: 'Configuration updated' else heroku_app.load_vars render :edit end end |