Skip to content

Instantly share code, notes, and snippets.

@jonleighton
Created June 23, 2011 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonleighton/6d4d9e8339058812dc75 to your computer and use it in GitHub Desktop.
Save jonleighton/6d4d9e8339058812dc75 to your computer and use it in GitHub Desktop.
# In my testing on 3-0-stable the first line passes and the second fails
# Should the second line really definitely ostensibly work?
def test_association_in_conditions
assert_equal companies(:first_client), Client.where(:firm_id => companies(:first_firm)).first
assert_equal companies(:first_client), Client.where(:firm => companies(:first_firm)).first
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment