1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/test/rails_app/config/initializers/new_rails_defaults.rb
José Valim 4d8f5ea165 Add an easy way to configure an application to sign in users through "/sign_in".
First, configure your routes:

  map.devise_for :users
  map.sign_in "/sign_in", :controller => "sessions", :action => "new"

Then, in config/initializers/devise.rb:

  config.use_default_scope = true

The default scope is always the first declaration in routes.rb, but if you need
to change it, you can also do it through the initializer:

  config.default_scope = :user
2010-01-06 14:31:00 +01:00

24 lines
No EOL
897 B
Ruby

# Be sure to restart your server when you modify this file.
# These settings change the behavior of Rails 2 apps and will be defaults
# for Rails 3. You can remove this initializer when Rails 3 is released.
if defined?(ActiveRecord)
# Include Active Record class name as root for JSON serialized output.
ActiveRecord::Base.include_root_in_json = true
# Store the full class name (including module namespace) in STI type column.
ActiveRecord::Base.store_full_sti_class = true
end
ActionController::Routing.generate_best_match = false
# Use ISO 8601 format for JSON serialized times and dates.
ActiveSupport.use_standard_json_time_format = true
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
# if you're including raw json in an HTML page.
ActiveSupport.escape_html_entities_in_json = false
# Clean up silencers
Rails.backtrace_cleaner.remove_silencers!