Displaying 2 results from an estimated 2 matches for "beta_codes".
2007 Apr 06
3
How to find rows where no row in associated table exists?
Basically, how do I do this "The Rails Way(tm)"
SELECT * FROM beta_users u LEFT JOIN beta_codes c ON u.id =
c.beta_user_id AND c.code IS NULL
At the moment I''m using find_by_sql, and that works Ok, but what would
be the Rails way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Tal...
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