Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/generators/kiqr/install/templates/rails/app/controllers/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#default_url_optionsObject

Automatically include account_id in all URL options if it is already present in the params. This is used to ensure that all routes are scoped to the current team. Personal account routes are not affected.



18
19
20
# File 'lib/generators/kiqr/install/templates/rails/app/controllers/application_controller.rb', line 18

def default_url_options
  { account_id: params[:account_id] }
end