From d761eab42b5f0dc4a819c271f16579f84724c3ae Mon Sep 17 00:00:00 2001 From: AvnerCohen Date: Tue, 16 Oct 2012 05:08:10 +0200 Subject: Moving code base to 1.9 hash syntax --- railties/lib/rails/generators/base.rb | 8 ++++---- railties/lib/rails/generators/named_base.rb | 2 +- .../test_unit/performance/templates/performance_test.rb | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'railties/lib/rails/generators') diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index 5ca1bfc20f..cf6daada20 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: # diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb index b61a5fc69d..2791bd9906 100644 --- a/railties/lib/rails/generators/named_base.rb +++ b/railties/lib/rails/generators/named_base.rb @@ -169,7 +169,7 @@ module Rails # # ==== Examples # - # check_class_collision :suffix => "Observer" + # check_class_collision suffix: "Observer" # # If the generator is invoked with class name Admin, it will check for # the presence of "AdminObserver". diff --git a/railties/lib/rails/generators/test_unit/performance/templates/performance_test.rb b/railties/lib/rails/generators/test_unit/performance/templates/performance_test.rb index 2f25dcf832..2bcb482d68 100644 --- a/railties/lib/rails/generators/test_unit/performance/templates/performance_test.rb +++ b/railties/lib/rails/generators/test_unit/performance/templates/performance_test.rb @@ -3,8 +3,8 @@ require 'rails/performance_test_help' class <%= class_name %>Test < ActionDispatch::PerformanceTest # Refer to the documentation for all available options - # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory], - # :output => 'tmp/performance', :formats => [:flat] } + # self.profile_options = { runs: 5, metrics: [:wall_time, :memory], + # output: 'tmp/performance', formats: [:flat] } test "homepage" do get '/' -- cgit v1.2.3