Class: Mks::Auth::ApplicationModulesController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- Mks::Auth::ApplicationModulesController
- Defined in:
- app/controllers/mks/auth/application_modules_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /application_modules.
-
#destroy ⇒ Object
DELETE /application_modules/1.
-
#edit ⇒ Object
GET /application_modules/1/edit.
-
#index ⇒ Object
GET /application_modules.
-
#new ⇒ Object
GET /application_modules/new.
-
#update ⇒ Object
PATCH/PUT /application_modules/1.
Methods inherited from ApplicationController
#app_code, #current_user, #current_user_id, #logged_in?
Instance Method Details
#create ⇒ Object
POST /application_modules
21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 21 def create @application_module = ApplicationModule.new(application_module_params) if @application_module.save redirect_to @application_module, notice: 'Application module was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /application_modules/1
41 42 43 44 |
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 41 def destroy @application_module.destroy redirect_to application_modules_url, notice: 'Application module was successfully destroyed.' end |
#edit ⇒ Object
GET /application_modules/1/edit
17 18 |
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 17 def edit end |
#index ⇒ Object
GET /application_modules
7 8 9 |
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 7 def index @application_modules = ApplicationModule.all end |
#new ⇒ Object
GET /application_modules/new
12 13 14 |
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 12 def new @application_module = ApplicationModule.new end |
#update ⇒ Object
PATCH/PUT /application_modules/1
32 33 34 35 36 37 38 |
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 32 def update if @application_module.update(application_module_params) redirect_to @application_module, notice: 'Application module was successfully updated.' else render :edit end end |