search for: find_or_initialize_bi

Displaying 3 results from an estimated 3 matches for "find_or_initialize_bi".

Did you mean: find_or_initialize_by
2006 Oct 21
0
find_or_initialize_by and Nested Resources
Hey guys, Lets say I have the following nested resources: map.resource artists do |artists| map.resource songs end To create a new song, the url would be: /artists/:artist_id/songs/:song_id However, lets say that an artist doesn''t exist yet. I only want to create an artist if a new song by the artist is successfully saved. I am retrieving the artist using something like: @artist
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
Hello all, I just ran into something that I think is a bug, and I would like to confirm with the core team whether this is expected/desired behavior or if this is a bug that I should file and develop failing tests for (I doubt I have the active record method_missing fu to actually patch it). Test Scenario: I would like to find or initialize a new user and base the find on the users email
2008 Feb 08
4
x-post : find_or_initialize_by ActiveRecord bug? Ignores :conditions
Hello, I posted this on the rails talk group but received no response. Perhaps someone on this list could weigh in on whether this is expected/desired behavior or a bug that I should file and develop failing tests for (I doubt I have the active record method_missing fu to actually patch it). Test Scenario: I would like to find or initialize a new user and base the find on the users email