similar to: Keep the Queries Down or "Referencing eagerly loaded models"

Displaying 15 results from an estimated 15 matches similar to: "Keep the Queries Down or "Referencing eagerly loaded models""

2006 Jan 06
2
How do I reference eagerly loaded Models in the View?
[I hope the repost isnt'' "minded". Following the advice of another thread I''ve changed the subject to a question. If I haven''t included important info, please ask. My database is being unduly killed. Jodi] Cheers on-the-Rails-ers, Before I start, I''ve read the ActiveRecord docs on eager loading, but for the life of me, I can''t seem to get
2006 Mar 10
5
PDF::Writer Simpletable Iteration
Hello All: I have been working with <a href="http://ruby-pdf.rubyforge.org/pdf-writer/index.html">Austin Ziegler''s PDF::Writer</a> as a means to produce PDF documents from my Rails app. I am stumped on how to iterate through a collection of items and output them in a table format. The way I have tried it so far only returns the last item in the collection -
2005 Nov 30
3
Downcasing Legacy Table Column Names
I''m looking for the simplest way to *automatically* downcase the attribute names of Models mapped to legacy tables that use upper case. eg: class Workorder < ActiveRecord::Base set_table_name "WORKORDER" end which has "NAME" as an attribute can use "name" as an attribute. currently: workorder = Workorder.find(1) workorder.NAME # =>
2006 Jan 10
1
sql server & linux: left join problem
I''ve got a left join problem of some sort connecting from linux FreeTDS/ODBC to SQL Server. It''s similar to the false post I had earlier, but this is a real problem. Here''s my code: def find_recipes_for_workorder @recipe_pages, @recipes = paginate_with_sort :recipes, :per_page => 10, \ :joins => ''left join workorder on
2006 Jan 10
1
sql server freetds/odbc question
I''m having an error from Linux via freeTDS/ODBC to SQL Server with cod that runs fine against SQLite and MySQL. Here''s the code: def find_recipes_for_workorder_by_id @recipe_pages, @recipes = paginate_with_sort :recipes, :per_page => 10, \ :conditions => ["recipe.workorder_id = ?", params [:workorder]] render :template =>
2007 Apr 14
5
SAMBA Problem - Users take ownership
Hi, I have a problem with my Samba/WinBIND implementation. In folders shared by multiple people the last one to access and modify a file takes ownership of the file and changes the permissions so other users cannot make changes to the same file: [root@atlas PLANNING RECORDS]# cd REGIONAL\ 1\ AIRLINE\ DOCS/ [root@atlas REGIONAL 1 AIRLINE DOCS]# ls -al total 1232 drwxrws---+ 8 root
2009 Oct 21
1
megatec_usb and "fry's" UPS
Gidday all - I've got a 1700VA dynamix UPS which is USB. The previous model (with a serial port) worked wonderfully with megatec, but this new one with USB is not working. It feels like the kernel is not handing the USB device properly. The web has not yeilded any useful info. What can I do from here? I'm not sure if its a kernel problem or a UPS config problem, but I'm hoping
2009 Oct 20
1
megatec_usb and "fry's" UPS
Gidday all - I've got a 1700VA dynamix UPS which is USB. The previous model (with a serial port) worked wonderfully with megatec, but this new one with USB is not working. It feels like the kernel is not handing the USB device properly. The web has not yeilded any useful info. What can I do from here? =========================================== [root at hera ups]# lsusb Bus 006 Device 002:
2004 Sep 16
2
Audiocodes Mediant 2000
Hi FOlks, I am trying to setup remotely an "AudioCodes Mediant 2000" MG Module 2 to work with Asterisk through SIP or H323. But since I don't the product manual, it's being a little hard. Anybody would the manual in PDF(file or URL) to indicate to me? Thanks a lot, Isamar
2006 Jan 15
13
Hotlinking an entire row in an HTML table
Hi, This seems simple but I cant get it to work... I have a table with 4 or 5 columns and 20-30 rows. I''d like to have the ability to click anywhere in a particular row to fire an action, such as bringing up a "Details" page for the clicked row. This would eliminate the need to generate a "Details" link at the end of every row, which is what I have now and looks
2006 May 23
1
How do I check if something was eagerly loaded?
I''m looking for a way to check an item in memory to see if an association loaded. I load the association in the controller and then in the view I need to check to see if the associated model loaded because I display an attribute of it. Of course, if the model didn''t load, because it doesn''t exist, I get an error. For example, in my controller I have thus:
2010 May 07
1
Can't eagerly load a polymorphic association defined in an STI parent class?
If I define an association (in my case a polymorphic one) in an STI parent class, and try to eagerly load it in a subclass, I get the following error: ActiveRecord::ConfigurationError: Association name ''myassoc'' was not found; perhaps you misspelled it? If I redefine the same association again in the STI subclass, it works. Is this a bug or what? -- You received this message
2007 Nov 15
0
[patch 14/19] xfs: eagerly remove vmap mappings to avoid upsetting Xen
-stable review patch. If anyone has any objections, please let us know. ------------------ From: Jeremy Fitzhardinge <jeremy@goop.org> patch ace2e92e193126711cb3a83a3752b2c5b8396950 in mainline. XFS leaves stray mappings around when it vmaps memory to make it virtually contigious. This upsets Xen if one of those pages is being recycled into a pagetable, since it finds an extra writable
2007 Nov 15
0
[patch 14/19] xfs: eagerly remove vmap mappings to avoid upsetting Xen
-stable review patch. If anyone has any objections, please let us know. ------------------ From: Jeremy Fitzhardinge <jeremy@goop.org> patch ace2e92e193126711cb3a83a3752b2c5b8396950 in mainline. XFS leaves stray mappings around when it vmaps memory to make it virtually contigious. This upsets Xen if one of those pages is being recycled into a pagetable, since it finds an extra writable
2006 Aug 02
10
Ruby deamon
We are building a web-based application with Ruby on Rails and MySQL backend. The client now wants us to add various workflow features that will eventually expand into SOAP web services. These workflow features include tasks such as automatically sending reminders for due tasks, or if a particular set of information hasn''t been logged by a certain time to automatically send an email