Class: PolicyManager::PortabilityRequestsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PolicyManager::PortabilityRequestsController
- Defined in:
- app/controllers/policy_manager/portability_requests_controller.rb
Instance Method Summary collapse
- #confirm ⇒ Object
-
#destroy ⇒ Object
DELETE /portability_requests/1.
-
#index ⇒ Object
GET /portability_requests.
Methods inherited from ApplicationController
#admin_user, #allow_admins, #current_user, #doc, #set_language, #user_authenticated?
Instance Method Details
#confirm ⇒ Object
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 |
#destroy ⇒ Object
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 |
#index ⇒ Object
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 |