Permalink
Browse files

commit transaction when response is 200

  • Loading branch information...
1 parent 2334c0f commit 540ea1a6bac9b561e6d2dc7a0d4b87b05a219612 @mkristian committed Jan 12, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack_datamapper/restful_transactions.rb
View
2 lib/rack_datamapper/restful_transactions.rb
@@ -17,7 +17,7 @@ def call(env)
transaction = DataMapper::Transaction.new(DataMapper.repository(@name))
transaction.commit do
status, headers, response = @app.call(env)
- raise Rollback unless (200 < status && status < 400)
+ raise Rollback unless (200 <= status && status < 400)
end
rescue Rollback
# ignore,

0 comments on commit 540ea1a

Please sign in to comment.