Permalink
Browse files

fixed definition_proxy bug due to expanded sequence api

  • Loading branch information...
1 parent 88511f1 commit e2b55aa33fa53bd412c190afe8b5ca8abcf2900f @kristianmandrup committed Apr 1, 2012
Showing with 1 addition and 7 deletions.
  1. +1 −1 lib/factory_girl/definition_proxy.rb
  2. +0 −6 lib/factory_girl/sequence.rb
@@ -109,7 +109,7 @@ def method_missing(name, *args, &block)
#
# Except that no globally available sequence will be defined.
def sequence(name, start_value = 1, options = {}, &block)
- sequence = Sequence.new(name, start_value, options, &block)
+ sequence = options.empty? ? Sequence.new(name, start_value, &block) : Sequence.new(name, start_value, options, &block)
add_attribute(name) { sequence.next }
end
@@ -22,11 +22,5 @@ def next
ensure
@value = @value.next
end
-
- private
-
- def value? item
- item.is_a?(Numeric) || item.is_a?(String)
- end
end
end

0 comments on commit e2b55aa

Please sign in to comment.