Skip to content

Commit

Permalink
Merge pull request spine#247 from joelvh/patch-1
Browse files Browse the repository at this point in the history
fixed findAllByAttribute(name, value) to make sure it filters results by association
  • Loading branch information
maccman committed Mar 30, 2012
2 parents 370b9d1 + 62b2931 commit 956f192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/relation.coffee
Expand Up @@ -25,7 +25,7 @@ class Collection extends Spine.Module

findAllByAttribute: (name, value) ->
@model.select (rec) =>
rec[name] is value
@associated(rec) and rec[name] is value

findByAttribute: (name, value) ->
@findAllByAttribute(name, value)[0]
Expand Down

0 comments on commit 956f192

Please sign in to comment.