Skip to content

Commit

Permalink
let's not use and in place of &&
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Apr 17, 2012
1 parent 5b336ff commit 3b0ffb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/generated_attribute.rb
Expand Up @@ -22,7 +22,7 @@ def parse(column_definition)


type, attr_options = *parse_type_and_options(type) 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 attr_options.merge!({:index => references_index}) if references_index


new(name, type, has_index, attr_options) new(name, type, has_index, attr_options)
Expand Down

0 comments on commit 3b0ffb1

Please sign in to comment.