search for: m000532

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

Did you mean: m000530
2006 Jun 03
1
Can I tell if the associated record is new in a belongs_to save?
...d? Hopefully this will explain my question: A Firm class declares has_many<http://api.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html#M000530>:clients and a client class declares belongs_to<http://api.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html#M000532>:firm. Now you do the following: Create a new firm and add clients using firm.clients.create methods. Note both firm and clients are unsaved at this point. Then you save the firm. It appears the sequence of events is 1) save the firm 2) save the clients Is it possible for the clients to kno...
2006 Apr 30
2
HABTM: Find sorted by number of associations
Hi, I''ve been googling and searching the forums for some time but can''t seem to find exactly what I''m looking for. Suppose User HABTM Products (for example a favorites list). I would like to construct a single query for finding Products ordered by the number of Users that have flagged them as favorites. Although I can construct the query using SQL a with a
2006 Mar 02
2
custom sql queries beyond CRUD
Hi, I am just starting of in rails. I am trying to understand the features of rails and I have this burning question. (and search is not available now): Apart from relying on the automatic CRUD sql script produced, is there a way I can create my own sql script ex: with many joins between exixting tables (for reporting ). All I need is to declare the custom query and place the result in a
2006 Mar 05
0
Can I execute DML from within Rails?
...st a MySQL database from within Rails? I have a table I''m using for batch processing. It needs to be truncated to reset the primary key before each batch insert statement. I looked at the API here: http://api.rubyonrails.com/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#M000532 and didn''t notice anything that looked like it would work. Thanks in advance. -- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson -------------- next part -------------- An HTML attachment was scrubbed... URL: http:/...