Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add Rails.version. [#236 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information
ryanb authored and lifo committed May 22, 2008
1 parent 314e556 commit 4e084c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions railties/lib/commands/console.rb
Expand Up @@ -24,9 +24,9 @@
end

if options[:sandbox]
puts "Loading #{ENV['RAILS_ENV']} environment in sandbox (Rails #{Rails::VERSION::STRING})"
puts "Loading #{ENV['RAILS_ENV']} environment in sandbox (Rails #{Rails.version})"
puts "Any modifications you make will be rolled back on exit"
else
puts "Loading #{ENV['RAILS_ENV']} environment (Rails #{Rails::VERSION::STRING})"
puts "Loading #{ENV['RAILS_ENV']} environment (Rails #{Rails.version})"
end
exec "#{options[:irb]} #{libs} --simple-prompt"
4 changes: 4 additions & 0 deletions railties/lib/initializer.rb
Expand Up @@ -43,6 +43,10 @@ def cache
RAILS_CACHE
end

def version
VERSION::STRING
end

def public_path
@@public_path ||= self.root ? File.join(self.root, "public") : "public"
end
Expand Down

0 comments on commit 4e084c3

Please sign in to comment.