Class: Mks::Auth::ApplicationModulesController

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

Instance Method Summary collapse

Methods included from ApplicationHelper

#app_module

Methods included from AccessHelper

#current_user, #fetch_menus, #logged_in?, #login_user, #logout_user

Instance Method Details

#createObject

POST /application_modules



23
24
25
26
27
28
29
30
31
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 23

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



43
44
45
46
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 43

def destroy
  @application_module.destroy
  redirect_to application_modules_url, notice: 'Application module was successfully destroyed.'
end

#editObject

GET /application_modules/1/edit



19
20
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 19

def edit
end

#indexObject

GET /application_modules



9
10
11
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 9

def index
  @application_modules = ApplicationModule.all
end

#newObject

GET /application_modules/new



14
15
16
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 14

def new
  @application_module = ApplicationModule.new
end

#updateObject

PATCH/PUT /application_modules/1



34
35
36
37
38
39
40
# File 'app/controllers/mks/auth/application_modules_controller.rb', line 34

def update
  if @application_module.update(application_module_params)
    redirect_to @application_module, notice: 'Application module was successfully updated.'
  else
    render :edit
  end
end