mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
Fix have_and_belong_to_many assertion in Rails 4
This commit is contained in:
parent
4594740650
commit
2b9130b462
2 changed files with 7 additions and 1 deletions
2
NEWS.md
2
NEWS.md
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue