Fix have_and_belong_to_many assertion in Rails 4

This commit is contained in:
Peter Haza 2013-05-04 00:31:37 +02:00 committed by Melissa Xie
parent 4594740650
commit 2b9130b462
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,7 @@
# HEAD
* Fix `have_and_belong_to_many` matcher issue for Rails 4.
# v 2.1.0
* Add missing `failure_message_for_should_not` implementations to

View File

@ -309,7 +309,11 @@ module Shoulda # :nodoc:
end
def join_table
reflection.options[:join_table].to_s
if reflection.respond_to? :join_table
reflection.join_table.to_s
else
reflection.options[:join_table].to_s
end
end
def associated_class