Skip to content

Commit

Permalink
No longer use add_attribute, since you can use 'name' freely.
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles committed Aug 19, 2008
1 parent 739800b commit a709983
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rails_generators/factory/factory_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ def manifest
end

def factory_line(attribute)
unless attribute.name == 'name'
"#{file_name}.#{attribute.name} '#{attribute.default}'"
else
"#{file_name}.add_attribute '#{attribute.name}', '#{attribute.default}'"
end
"#{file_name}.#{attribute.name} '#{attribute.default}'"
end

protected
Expand Down

0 comments on commit a709983

Please sign in to comment.