diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/generators/generated_attribute.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index b9944bed26..7da495211d 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -2,7 +2,6 @@ module Rails class Application module Finisher include Initializable - $rails_rake_task = nil initializer :add_generator_templates do config.generators.templates.unshift(*paths["lib/templates"].existent) @@ -49,7 +48,7 @@ module Rails end initializer :eager_load! do - if config.cache_classes && !$rails_rake_task + if config.cache_classes && !(defined?($rails_rake_task) && $rails_rake_task) ActiveSupport.run_load_hooks(:before_eager_load, self) eager_load! end diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index ca93f9ef9d..781d7bf47c 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -1,5 +1,6 @@ require 'open-uri' require 'rbconfig' +require 'active_support/core_ext/array/wrap' module Rails module Generators diff --git a/railties/lib/rails/generators/generated_attribute.rb b/railties/lib/rails/generators/generated_attribute.rb index cfd58527ef..8d307ca536 100644 --- a/railties/lib/rails/generators/generated_attribute.rb +++ b/railties/lib/rails/generators/generated_attribute.rb @@ -29,8 +29,8 @@ module Rails case type when /(string|text|binary|integer)\{(\d+)\}/ return $1, :limit => $2.to_i - when /decimal\{(\d+),(\d+)\}/ - return :decimal, :precision => $1.to_i, :scale => $2.to_i + when /decimal\{(\d+)(,|\.|\-)(\d+)\}/ + return :decimal, :precision => $1.to_i, :scale => $3.to_i else return type, {} end |