Class: BsmOa::ApplicationsController

Inherits:
AdminController show all
Defined in:
app/controllers/bsm_oa/applications_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject


25
26
27
28
# File 'app/controllers/bsm_oa/applications_controller.rb', line 25

def create
  @application = resource_scope.create permitted_params
  respond_with @application
end

#destroyObject


35
36
37
38
# File 'app/controllers/bsm_oa/applications_controller.rb', line 35

def destroy
  resource.destroy
  respond_with resource, location: bsm_oa_applications_path
end

#editObject


21
22
23
# File 'app/controllers/bsm_oa/applications_controller.rb', line 21

def edit
  respond_with resource
end

#indexObject


7
8
9
10
# File 'app/controllers/bsm_oa/applications_controller.rb', line 7

def index
  @applications = apply_scopes(resource_scope)
  respond_with @applications
end

#newObject


16
17
18
19
# File 'app/controllers/bsm_oa/applications_controller.rb', line 16

def new
  @application = resource_scope.new
  respond_with @application
end

#showObject


12
13
14
# File 'app/controllers/bsm_oa/applications_controller.rb', line 12

def show
  respond_with resource
end

#updateObject


30
31
32
33
# File 'app/controllers/bsm_oa/applications_controller.rb', line 30

def update
  resource.update(permitted_params)
  respond_with resource
end