Skip to content

Commit

Permalink
making it so that :parent and :class can coexist in a factory definition
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Quaranto <nick@quaran.to>
  • Loading branch information
ryana authored and qrush committed Mar 2, 2009
1 parent 44ca8fc commit 7b63939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/factory_girl/factory.rb
Expand Up @@ -70,7 +70,7 @@ def initialize (name, options = {}) #:nodoc:
end

def inherit_from(parent) #:nodoc:
@options[:class] = parent.class_name
@options[:class] ||= parent.class_name
parent.attributes.each do |attribute|
unless attribute_defined?(attribute.name)
@attributes << attribute.clone
Expand Down

0 comments on commit 7b63939

Please sign in to comment.