search for: headerkey_id

Displaying 1 result from an estimated 1 matches for "headerkey_id".

Did you mean: headerkeys_id
2006 Jun 07
1
has_many, through, want to store email in mysql
...ist @email_pages, @emails = paginate :emails, :per_page => 10, :conditions => ["email_id is NULL"] end And in the list view this (in short - only from colunn): <% for email in @emails %> <tr> <td><%= email.headers.find(:first, :conditions => [''headerkey_id = ?'', 6]).value %></td> </tr> <% end %> This means that for 30 emails, in the case of 3 columns (from, subject, date), a total of 32 SELECTS have to be done.. That doesn''t look too efficient :) What would be the best way to do this ? Should I use a predef...