Skip to content

Commit

Permalink
Changing which attributes are considered numeric - references should …
Browse files Browse the repository at this point in the history
…not be numeric
  • Loading branch information
knaveofdiamonds committed Jul 26, 2009
1 parent b42d422 commit 76c2d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rails_generators/model/model_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def manifest
end

def numeric_attributes
@numeric_attributes ||= attributes.select {|a| [:integer, :decimal, :float].include?(a.type) }
@numeric_attributes ||= attributes.select {|a| ! a.reference? && ['integer', 'decimal', 'float'].include?(a.type) }
end

protected
Expand Down

0 comments on commit 76c2d21

Please sign in to comment.