Class: PolicyManager::PortabilityRequestsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/policy_manager/portability_requests_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#admin_user, #allow_admins, #current_user, #doc, #set_language, #user_authenticated?

Instance Method Details

#confirmObject



17
18
19
20
21
22
# File 'app/controllers/policy_manager/portability_requests_controller.rb', line 17

def confirm
  @portability_request = PortabilityRequest.find(params[:id])
  if @portability_request.confirm!
    redirect_to portability_requests_path
  end
end

#destroyObject

DELETE /portability_requests/1



25
26
27
28
# File 'app/controllers/policy_manager/portability_requests_controller.rb', line 25

def destroy
  @portability_request = PortabilityRequest.find(params[:id]).destroy
  redirect_to portability_requests_url, notice: I18n.t("terms_app.portability_requests.index.destroyed")
end

#indexObject

GET /portability_requests



9
10
11
12
13
14
15
# File 'app/controllers/policy_manager/portability_requests_controller.rb', line 9

def index
  @portability_requests = PortabilityRequest.order(created_at: :desc)
                                            .paginate(
                                              :page => params[:page], 
                                              :per_page => 10
                                            )
end