Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Defined in:
- app/controllers/application_controller.rb
Direct Known Subclasses
Admin::ActivitiesController, Admin::AdjustmentsController, Admin::ClientAccountingController, Admin::ClientFinancialTransactionsController, Admin::ClientRepresentativesController, Admin::ClientsController, Admin::EmployeeClientLaborRatesController, Admin::EmployeesController, Admin::InvoicesController, Admin::LaborsController, Admin::MaterialsController, Admin::PaymentsController, Admin::ProposalsController, Admin::SettingsController, AuthenticationController
Instance Method Summary collapse
Instance Method Details
#validate_credentials ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/application_controller.rb', line 9 def validate_credentials @active_credential = Credential.find session[:credential_id] if session[:credential_id] unless Credential.guest_permitted? params[:controller], params[:action] if @active_credential render :file => "#{RAILS_ROOT}/public/500.html", :status => 500 unless @active_credential.is_request_permitted?( params[:controller], params[:action] ) else session[:uncredentialed_request_uri] = request.request_uri redirect_to login_url end end end |