aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2013-04-01 12:32:22 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2013-04-01 12:32:22 -0700
commited8df3ff018d17fad123e48c7cb907332e72e7dc (patch)
tree51a2a1738fef79ccd30d4c3681218609c3189f20 /railties
parentc311447a0f1da00dfc1353645c486cc93cd575c8 (diff)
parentceb3b8717beb9818fbfbab429a8aa697591e184a (diff)
downloadrails-ed8df3ff018d17fad123e48c7cb907332e72e7dc.tar.gz
rails-ed8df3ff018d17fad123e48c7cb907332e72e7dc.tar.bz2
rails-ed8df3ff018d17fad123e48c7cb907332e72e7dc.zip
Merge pull request #10002 from charliesome/revert-version-method-on-rails
Reverts changes to Rails.version made in #8501
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails.rb4
-rw-r--r--railties/lib/rails/version.rb13
2 files changed, 10 insertions, 7 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb
index 84f8b82ad5..bb98bbe5bf 100644
--- a/railties/lib/rails.rb
+++ b/railties/lib/rails.rb
@@ -82,6 +82,10 @@ module Rails
groups
end
+ def version
+ VERSION::STRING
+ end
+
def public_path
application && Pathname.new(application.paths["public"].first)
end
diff --git a/railties/lib/rails/version.rb b/railties/lib/rails/version.rb
index d1d02e086d..47c21b112c 100644
--- a/railties/lib/rails/version.rb
+++ b/railties/lib/rails/version.rb
@@ -1,11 +1,10 @@
module Rails
- # Returns the version of the currently loaded Rails as a Gem::Version
- def self.version
- Gem::Version.new "4.0.0.beta1"
- end
+ module VERSION
+ MAJOR = 4
+ MINOR = 0
+ TINY = 0
+ PRE = "beta1"
- module VERSION #:nodoc:
- MAJOR, MINOR, TINY, PRE = Rails.version.segments
- STRING = Rails.version.to_s
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
end