aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorKuldeep Aggarwal <kd.engineer@yahoo.co.in>2013-11-15 00:53:57 +0530
committerKuldeep Aggarwal <kd.engineer@yahoo.co.in>2013-11-15 00:53:57 +0530
commitd3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd (patch)
tree65004268d5092ecc56983a455603729d7476f148 /railties
parent140c0c8881d100b0d0bc2a0bce1227ddfbd9c9bd (diff)
downloadrails-d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.tar.gz
rails-d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.tar.bz2
rails-d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.zip
Used Yield instead of block.call
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/actions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb
index 366c72ebaa..4757c79ac6 100644
--- a/railties/lib/rails/generators/actions.rb
+++ b/railties/lib/rails/generators/actions.rb
@@ -84,10 +84,10 @@ module Rails
# environment(nil, env: "development") do
# "config.autoload_paths += %W(#{config.root}/extras)"
# end
- def environment(data=nil, options={}, &block)
+ def environment(data = nil, options = {})
sentinel = /class [a-z_:]+ < Rails::Application/i
env_file_sentinel = /Rails\.application\.configure do/
- data = block.call if !data && block_given?
+ data = yield if !data && block_given?
in_root do
if options[:env].nil?