Skip to content
Browse files

Add Rails.version. [#236 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent 314e556 commit 4e084c3d9860c31fca21395c13031f04bb510b15 @ryanb ryanb committed with lifo May 21, 2008
Showing with 6 additions and 2 deletions.
  1. +2 −2 railties/lib/commands/console.rb
  2. +4 −0 railties/lib/initializer.rb
View
4 railties/lib/commands/console.rb
@@ -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"
View
4 railties/lib/initializer.rb
@@ -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

0 comments on commit 4e084c3

Please sign in to comment.
Something went wrong with that request. Please try again.