search for: find_or_

Displaying 2 results from an estimated 2 matches for "find_or_".

Did you mean: find_by_
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
...lly patch it). Test Scenario: I would like to find or initialize a new user and base the find on the users email address, however the user found has to also match one of two possible ''state'' values (passive || pending_singup). While trying to implement this I discovered that the find_or_(initialize| create)_by_* dynamic finders totally and silently ignore any conditions passed. Bug? Should''nt these dynamic finders behave the same as find_by_* or find_all_by_* dynamic finders and use the :conditions passed to them? The documentation seems to indicate that they should. ht...
2008 Feb 08
4
x-post : find_or_initialize_by ActiveRecord bug? Ignores :conditions
...lly patch it). Test Scenario: I would like to find or initialize a new user and base the find on the users email address, however the user found has to also match one of two possible ''state'' values (passive || pending_singup). While trying to implement this I discovered that the find_or_(initialize| create)_by_* dynamic finders totally and silently ignore any conditions passed. Bug? Should''nt these dynamic finders behave the same as find_by_* or find_all_by_* dynamic finders and use the :conditions passed to them? The documentation seems to indicate that they should. ht...