diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-04-18 00:36:58 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-04-18 00:37:12 +0530 |
commit | 3b0ffb1efd9d70bf89571d720d994425ba428419 (patch) | |
tree | 513437b5e7ea02f8090f2dc960da8e776c9f2cea /railties | |
parent | 5b336ff44364ac4adcf137838e71a8f0bb4f35a0 (diff) | |
download | rails-3b0ffb1efd9d70bf89571d720d994425ba428419.tar.gz rails-3b0ffb1efd9d70bf89571d720d994425ba428419.tar.bz2 rails-3b0ffb1efd9d70bf89571d720d994425ba428419.zip |
let's not use `and` in place of `&&`
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/generated_attribute.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/generated_attribute.rb b/railties/lib/rails/generators/generated_attribute.rb index 7296068f04..21167359cc 100644 --- a/railties/lib/rails/generators/generated_attribute.rb +++ b/railties/lib/rails/generators/generated_attribute.rb @@ -22,7 +22,7 @@ module Rails type, attr_options = *parse_type_and_options(type) - references_index = (type.in?(%w(references belongs_to)) and UNIQ_INDEX_OPTIONS.include?(has_index) ? {:unique => true} : true) + references_index = type.in?(%w(references belongs_to)) && UNIQ_INDEX_OPTIONS.include?(has_index) ? {:unique => true} : true attr_options.merge!({:index => references_index}) if references_index new(name, type, has_index, attr_options) |