How to read ruby on rails config values from within the application controller How to read ruby on rails config values from within the application controller ruby-on-rails ruby-on-rails

How to read ruby on rails config values from within the application controller


In Ruby on Rails 3 and above, you can access the config through Rails.application.config


In more recent versions, you can use Rails.configuration instead. For example: Rails.configuration.time_zone.See more in the official manual on configuration


The class method ActionController::Base.session_options returns a hash of the configuration options for the session.

So in your case you want ActionController::Base.session_options[:domain]