Class: WcoEmail::ConfigsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- WcoEmail::ConfigsController
- Defined in:
- app/controllers/wco_email/configs_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/wco_email/configs_controller.rb', line 23 def create @config = WcoEmail::Config.new(config_params) :index, WcoEmail::Config if @config.save flash[:notice] = 'Success.' redirect_to action: 'index' else render :new, status: :unprocessable_entity end end |
#destroy ⇒ Object
45 46 47 48 49 |
# File 'app/controllers/wco_email/configs_controller.rb', line 45 def destroy :index, WcoEmail::Config @config.destroy redirect_to action: 'index' end |
#edit ⇒ Object
19 20 21 |
# File 'app/controllers/wco_email/configs_controller.rb', line 19 def edit :index, WcoEmail::Config end |
#index ⇒ Object
5 6 7 8 |
# File 'app/controllers/wco_email/configs_controller.rb', line 5 def index @configs = WcoEmail::Config.all :index, WcoEmail::Config end |
#new ⇒ Object
14 15 16 17 |
# File 'app/controllers/wco_email/configs_controller.rb', line 14 def new @config = WcoEmail::Config.new :index, WcoEmail::Config end |
#show ⇒ Object
10 11 12 |
# File 'app/controllers/wco_email/configs_controller.rb', line 10 def show :index, WcoEmail::Config end |
#update ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'app/controllers/wco_email/configs_controller.rb', line 35 def update :index, WcoEmail::Config if @config.update(config_params) flash[:notice] = 'Success.' redirect_to action: 'index' else render :edit, status: :unprocessable_entity end end |