Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Git update version to 5.0.7

  • Loading branch information...
commit cb618ff15868de6a2515cd30875b0910a833c643 1 parent 6143ed5
Charlie Savage authored
View
3  History.rdoc
@@ -1,3 +1,6 @@
+== 5.0.7 2012-06-03
+* Fixed bug where validates_uniqueness failed for 3 or more primary keys. (Charlie Savage)
+
== 5.0.6 2012-05-20
* Fixed bug where setting a belongs_to association to nil would raise an error (Tyler Rick)
* Remove special case code for 1 column selects and just choose to use Rails version of the
View
2  lib/composite_primary_keys/version.rb
@@ -2,7 +2,7 @@ module CompositePrimaryKeys
module VERSION
MAJOR = 5
MINOR = 0
- TINY = 6
+ TINY = 7
STRING = [MAJOR, MINOR, TINY].join('.')
end
end
View
10 test/test_validations.rb
@@ -1,13 +1,13 @@
require File.expand_path('../abstract_unit', __FILE__)
class TestValidations < ActiveSupport::TestCase
- fixtures :seats
+ fixtures :students, :dorms, :rooms, :room_assignments
def test_uniqueness_validation_persisted
- seat = Seat.find([1,1])
- assert(seat.valid?)
+ room_assignment = RoomAssignment.find([1, 1, 1])
+ assert(room_assignment.valid?)
- seat.customer = 2
- assert(!seat.valid?)
+ room_assignment = RoomAssignment.new(:student_id => 1, :dorm_id => 1, :room_id => 2)
+ assert(!room_assignment.valid?)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.