Skip to content

Commit

Permalink
Revert #9, go back to generating sequential ids on save (fixes #10)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrickreimer committed Oct 24, 2014
1 parent 192a02d commit c12726f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion lib/sequenced/acts_as_sequenced.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def acts_as_sequenced(options = {})
cattr_accessor :sequenced_options
self.sequenced_options = options

before_validation :set_sequential_id
before_save :set_sequential_id
include Sequenced::ActsAsSequenced::InstanceMethods
end
end
Expand Down
6 changes: 0 additions & 6 deletions test/acts_as_sequenced_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,4 @@ class ActsAsSequencedTest < ActiveSupport::TestCase
assert_equal 1, zombie.sequential_id
assert_equal 2, werewolf.sequential_id
end

test "validation passing" do
obj = Policeman.create
assert_empty obj.errors[:sequential_id]
assert obj.valid?
end
end

0 comments on commit c12726f

Please sign in to comment.