Commit e4462cf52ecb8c624a00910ccbfef38ddddf8118
- Date: Tue Mar 18 14:27:11 +0000 2008
- Committer: Ron Damen (ron@ganja.nl)
- Author: Ron Damen (ron@ganja.nl)
- Commit SHA1: e4462cf52ecb8c624a00910ccbfef38ddddf8118
- Tree SHA1: 810336487813edb26a5c3cc003ab71082a42df98
fixed version check
* should be a greater than (>) instead of less than (<).
* removed the silly stuff, comparing the string just works.
Commit diff
| |   |
| 70 | 70 | def sqlite_by_default |
| 71 | 71 | begin |
| 72 | 72 | require 'config/boot.rb' |
| 73 | | # TODO: Make this less nasty. |
| 74 | | rails_version = Rails::VERSION::STRING.scan(/(\d)/).flatten.to_s.to_i |
| 75 | | rails_version <= 202 |
| 73 | Rails::VERSION::STRING >= "2.0.2" |
| 76 | 74 | rescue LoadError |
| 77 | 75 | true |
| 78 | 76 | end |
| toggle raw diff |
--- a/lib/git-rails/commands/init.rb
+++ b/lib/git-rails/commands/init.rb
@@ -70,9 +70,7 @@ module GitRails
def sqlite_by_default
begin
require 'config/boot.rb'
- # TODO: Make this less nasty.
- rails_version = Rails::VERSION::STRING.scan(/(\d)/).flatten.to_s.to_i
- rails_version <= 202
+ Rails::VERSION::STRING >= "2.0.2"
rescue LoadError
true
end |