search for: find_by_xxx

Displaying 4 results from an estimated 4 matches for "find_by_xxx".

2007 Apr 03
0
[Sybase Adaptor] find_by_xxx does not work correctly.
Hi Please advice me about the following problem. * Problem find_by_xxx method does not work correctly the following caes with sybase adaptor. * How to reproducible model :users t.column :code, :string <-- :string column t.column :last_name, :string t.column :first_name,:string >> User.find(1) => #<User:0x2abe232a68e8 @attributes={&qu...
2009 Dec 28
2
Override .find, .find_by_id, etc...
I read these: http://www.ruby-forum.com/topic/185297#new http://www.freezzo.com/2008/05/14/override-default-find-conditions-for-model/ it works, it override the .find perfectly, however it does not cover .find_by_id or other .find_by_XXX Is there anyway to override all the find function of a modal? I want to set the default "select" for User modal, only return name and id, but not the password by default. Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the G...
2006 Apr 13
2
Automatic finder
It looks rails automatically creates a "finder" method on models that have a "belongs_to". So I tried this in the console: c = Category.find(2) chunks = Chunk.find_by_category(c) chunks is always returned as an empty array. When I know have some chunks with a category_id of 2. Should the find_by_category do what I think it should be doing or am I completely off base?
2008 May 22
9
Retrieving Mutliple Records using find_by_*
I was hoping that AR''s find_by_* magic methods would help me retrieve multiple items somewhat like the following: names_to_find = [''Larry'', ''Moe'', ''Curly''] found_people = Person.find_by_name(names_to_find) Is there a way to accomplish this using find_by_* (or even find(:all) using some sort of conditions) or must I resort to SQL