diff options
author | Joshua Peek <josh@joshpeek.com> | 2012-10-15 10:20:50 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2012-10-15 10:20:50 -0500 |
commit | c800e27ad35ec46f32b5ac4428e5cf7141f95105 (patch) | |
tree | 0821e0afaba2a74dec6ea1397ee3cabfd3d10c59 /railties/lib/rails/generators/base.rb | |
parent | 7dba1599d9092a8362956a3fab23b2c60eedea63 (diff) | |
parent | 46dc6e7786222865309d15a9eaaaf55e3b7d9c1f (diff) | |
download | rails-c800e27ad35ec46f32b5ac4428e5cf7141f95105.tar.gz rails-c800e27ad35ec46f32b5ac4428e5cf7141f95105.tar.bz2 rails-c800e27ad35ec46f32b5ac4428e5cf7141f95105.zip |
Merge branch 'master' into asset-path-helper
Conflicts:
railties/test/application/configuration_test.rb
Diffstat (limited to 'railties/lib/rails/generators/base.rb')
-rw-r--r-- | railties/lib/rails/generators/base.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index 5ca1bfc20f..7e938fab47 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -61,7 +61,7 @@ module Rails # # module Rails::Generators # class ControllerGenerator < Base - # hook_for :test_framework, :aliases => "-t" + # hook_for :test_framework, aliases: "-t" # end # end # @@ -102,7 +102,7 @@ module Rails # :as option: # # class AwesomeGenerator < Rails::Generators::Base - # hook_for :test_framework, :as => :controller + # hook_for :test_framework, as: :controller # end # # And now it will lookup at: @@ -113,7 +113,7 @@ module Rails # need to provide the :base value: # # class AwesomeGenerator < Rails::Generators::Base - # hook_for :test_framework, :in => :rails, :as => :controller + # hook_for :test_framework, in: :rails, as: :controller # end # # And the lookup is exactly the same as previously: @@ -137,7 +137,7 @@ module Rails # developers might want to have webrat available on controller generator. # This can be achieved as: # - # Rails::Generators::ControllerGenerator.hook_for :webrat, :type => :boolean + # Rails::Generators::ControllerGenerator.hook_for :webrat, type: :boolean # # Then, if you want webrat to be invoked, just supply: # @@ -171,9 +171,9 @@ module Rails defaults = if options[:type] == :boolean { } elsif [true, false].include?(default_value_for_option(name, options)) - { :banner => "" } + { banner: "" } else - { :desc => "#{name.to_s.humanize} to be invoked", :banner => "NAME" } + { desc: "#{name.to_s.humanize} to be invoked", banner: "NAME" } end unless class_options.key?(name) @@ -343,8 +343,8 @@ module Rails # Small macro to add ruby as an option to the generator with proper # default value plus an instance helper method called shebang. def self.add_shebang_option! - class_option :ruby, :type => :string, :aliases => "-r", :default => Thor::Util.ruby_command, - :desc => "Path to the Ruby binary of your choice", :banner => "PATH" + class_option :ruby, type: :string, aliases: "-r", default: Thor::Util.ruby_command, + desc: "Path to the Ruby binary of your choice", banner: "PATH" no_tasks { define_method :shebang do |