aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-20 17:51:26 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-20 17:59:26 +0100
commit9cf38be008aff555b3aecc53a6f18800cea30a71 (patch)
tree971681e6a49b1d55c674ffc39bd49559ab010333 /railties/lib
parent500ca98fef7a8cc20f1f8f5835091e1f119e0d8a (diff)
downloadrails-9cf38be008aff555b3aecc53a6f18800cea30a71.tar.gz
rails-9cf38be008aff555b3aecc53a6f18800cea30a71.tar.bz2
rails-9cf38be008aff555b3aecc53a6f18800cea30a71.zip
Get rid of --old-style-hash
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/app_base.rb12
-rw-r--r--railties/lib/rails/generators/named_base.rb3
2 files changed, 2 insertions, 13 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 197b692469..ab699e4c9e 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -60,9 +60,6 @@ module Rails
class_option :help, :type => :boolean, :aliases => "-h", :group => :rails,
:desc => "Show this help message and quit"
-
- class_option :old_style_hash, :type => :boolean, :default => false,
- :desc => "Force using old style hash (:foo => 'bar') on Ruby >= 1.9"
end
def initialize(*args)
@@ -255,14 +252,9 @@ module Rails
create_file("#{destination}/.gitkeep") unless options[:skip_git]
end
- # Returns Ruby 1.9 style key-value pair if current code is running on
- # Ruby 1.9.x. Returns the old-style (with hash rocket) otherwise.
+ # Returns Ruby 1.9 style key-value pair.
def key_value(key, value)
- if options[:old_style_hash] || RUBY_VERSION < '1.9'
- ":#{key} => #{value}"
- else
- "#{key}: #{value}"
- end
+ "#{key}: #{value}"
end
end
end
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb
index c6c0392f43..547b31cf7b 100644
--- a/railties/lib/rails/generators/named_base.rb
+++ b/railties/lib/rails/generators/named_base.rb
@@ -9,9 +9,6 @@ module Rails
class_option :skip_namespace, :type => :boolean, :default => false,
:desc => "Skip namespace (affects only isolated applications)"
- class_option :old_style_hash, :type => :boolean, :default => false,
- :desc => "Force using old style hash (:foo => 'bar') on Ruby >= 1.9"
-
def initialize(args, *options) #:nodoc:
@inside_template = nil
# Unfreeze name in case it's given as a frozen string