search for: find_in_collect

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

2006 May 05
0
Missing documentation for find_in_collection? Trying to drill down in a 4 level has_many association fails
...hods via the code completion of IRB, but I have no idea how to use them and can only find one hint in the API http://api.rubyonrails.com/classes/ActiveRecord/Associations/ ClassMethods.html It mentions here in the has many associations that if you use the finder_sql that you would loose the find_in_collection. What are these and the find_all_in_collection methods I am finding. For example the simple models i am using is a 4-tier has_many structure like this: class User < ActiveRecord::Base has_many :foos, end class Foo < ActiveRecord::Base belongs_to :user has_many...
2007 Feb 08
3
Get categories where forum-user posted in
...similar to the ForumExample (http:// wiki.rubyonrails.org/rails/pages/ForumExample), and stumbled upon the following. Let''s say I wanted to get all the categories a certain user posted in. How do I get that information withouth using a custom query through :finder_sql (and thus losing the find_in_collection ownage)? It would also be great to see how many post that author made in a category while I''m at it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this g...
2006 Oct 27
1
has_many with nullable foreign_key?
Is there a way to use has_many and have it operate like such? select * from pages where site_id = #{id} or site_id is null I know there''s finder_sql, but then I''ll lose the find_in_collection goodness. Thanks, Joe -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPx...