Class: Mks::Auth::ApplicationModulesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/mks/auth/application_modules_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#app_code, #current_user, #current_user_id, #logged_in?

Instance Method Details

#createObject

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

#destroyObject

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

#editObject

GET /application_modules/1/edit



17
18
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 17

def edit
end

#indexObject

GET /application_modules



7
8
9
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 7

def index
  @application_modules = ApplicationModule.all
end

#newObject

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

#updateObject

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