- MODULE Rails::ActionMethods
- MODULE Rails::Configuration
- MODULE Rails::Generators
- MODULE Rails::Info
- MODULE Rails::Initializable
- MODULE Rails::Paths
- MODULE Rails::Rack
- MODULE Rails::ScriptRailsLoader
- CLASS Rails::AppBuilder
- CLASS Rails::Application
- CLASS Rails::BacktraceCleaner
- CLASS Rails::Console
- CLASS Rails::DBConsole
- CLASS Rails::Engine
- CLASS Rails::InfoController
- CLASS Rails::Plugin
- CLASS Rails::PluginBuilder
- CLASS Rails::Railtie
- CLASS Rails::Server
- CLASS Rails::TestUnitRailtie
- A
- B
- C
- E
- G
- I
- L
- P
- R
- V
Source: show
# File railties/lib/rails.rb, line 36 def application @@application ||= nil end
Source: show
# File railties/lib/rails.rb, line 40 def application=(application) @@application = application end
Source: show
# File railties/lib/rails.rb, line 69 def backtrace_cleaner @@backtrace_cleaner ||= begin # Relies on Active Support, so we have to lazy load to postpone definition until AS has been loaded require 'rails/backtrace_cleaner' Rails::BacktraceCleaner.new end end
The Configuration instance used to configure the Rails environment
Source: show
# File railties/lib/rails.rb, line 45 def configuration application.config end
Source: show
# File railties/lib/rails.rb, line 81 def env @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development") end
Source: show
# File railties/lib/rails.rb, line 85 def env=(environment) @_env = ActiveSupport::StringInquirer.new(environment) end
Returns all rails groups for loading based on:
-
The Rails environment;
-
The environment variable RAILS_GROUPS;
-
The optional envs given as argument and the hash with group dependencies;
Examples
groups :assets => [:development, :test] # Returns # => [:default, :development, :assets] for Rails.env == "development" # => [:default, :production] for Rails.env == "production"
Source: show
# File railties/lib/rails.rb, line 107 def groups(*groups) hash = groups.extract_options! env = Rails.env groups.unshift(:default, env) groups.concat ENV["RAILS_GROUPS"].to_s.split(",") groups.concat hash.map { |k,v| k if v.map(&:to_s).include?(env) } groups.compact! groups.uniq! groups end
Source: show
# File railties/lib/rails.rb, line 49 def initialize! application.initialize! end
Source: show
# File railties/lib/rails.rb, line 57 def initialized=(initialized) @@initialized ||= initialized end
Source: show
# File railties/lib/rails.rb, line 53 def initialized? @@initialized || false end
Source: show
# File railties/lib/rails.rb, line 65 def logger=(logger) @@logger = logger end
Source: show
# File railties/lib/rails.rb, line 122 def public_path application && application.paths["public"].first end
Source: show
# File railties/lib/rails.rb, line 77 def root application && application.config.root end