diff options
author | Ben Orenstein <ben.orenstein@gmail.com> | 2011-06-08 23:05:43 -0400 |
---|---|---|
committer | Ben Orenstein <ben.orenstein@gmail.com> | 2011-06-08 23:11:19 -0400 |
commit | f87888066a7280430fd48f7b76bf63d31dbce81a (patch) | |
tree | 8ffda686cf9bfde331488f9f0e162ef06397fe48 /activesupport/lib/active_support | |
parent | 54b0aeba64db8c52ac8c6cda2aaa81d8717b8549 (diff) | |
download | rails-f87888066a7280430fd48f7b76bf63d31dbce81a.tar.gz rails-f87888066a7280430fd48f7b76bf63d31dbce81a.tar.bz2 rails-f87888066a7280430fd48f7b76bf63d31dbce81a.zip |
Simplify boolean logic into ternary.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/delegation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index 3a7652f5bf..1777a4b32d 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -113,7 +113,7 @@ class Module raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method." end - prefix = options[:prefix] && "#{options[:prefix] == true ? to : options[:prefix]}_" || '' + prefix = options[:prefix] ? "#{options[:prefix] == true ? to : options[:prefix]}_" : '' file, line = caller.first.split(':', 2) line = line.to_i |