search for: add_joins

Displaying 6 results from an estimated 6 matches for "add_joins".

2007 Dec 09
0
straight join in rails
...erated sql query, and replace SELECT with SELECT STRAIGHT_JOIN. Here''s a monkey-patch (written against ActiveRecord 1.5.14) that achieves this behaviour: module ActiveRecord class Base class << self VALID_FIND_OPTIONS << :straight_join alias_method :orig_add_joins!, :add_joins! def add_joins!(sql, options, scope = :auto) orig_add_joins!(sql,options,scope) sql.gsub!(/^SELECT/,''SELECT STRAIGHT_JOIN'') if options[:straight_join] end end end end So simply supply a :straight_join => true option to finde...
2007 Sep 14
4
Refactoring ActiveRecord's private methods
As it currently stands, ActiveRecord has alot of private and protected methods in the Base class. >> ActiveRecord::Base.methods.size => 427 >> ActiveRecord::Base.protected_methods.size => 32 >> ActiveRecord::Base.private_methods.size => 193 I really loved the suggestion by Courtenay in Refactoring AR::Base.find (http://groups.google.com/group/rubyonrails-core/
2006 Apr 06
7
[Fwd: Rails AR/Oracle Unit Test: [4185] failed]
So my automated script caught this issue, though I think my email headers were bad, so rails-core has put the automated email on hold pending "moderation". I''ll fix that issue, and look at the one below as well. -------- Original Message -------- Subject: Rails AR/Oracle Unit Test: [4185] failed Date: Thu, 6 Apr 2006 08:32:04 -0700 From: Michael Schoen
2009 Mar 09
3
multiple columns primary key
Hi all, I have two tables: TABLE 1 A pk - fk (referencesc TABLE 2) B pk C pk D pk E F TABLE 2 A pk G H I L I don''t use incremental field (id). I''d like don''t use find_by_sql. How can I define both models to use correctly find method (with include)? With only one column primary key I haven''t problems. I thought two solutions, but I don''t like these
2012 Apr 27
0
Wine release 1.5.3
The Wine development release 1.5.3 is now available. What's new in this release (see below for details): - Support for graphics bounds tracking. - A number of fixes to the builtin Internet Explorer. - Support for displaying ARM code in the Wine debugger. - Various DirectMusic improvements. - Better namespace support in MSXML. - Various bug fixes. The source is available from the
2012 Jun 15
0
Wine release 1.4.1
The Wine maintenance release 1.4.1 is now available. What's new in this release (see below for details): - Translation updates. - Various bug fixes. The source is available from the following locations: http://prdownloads.sourceforge.net/wine/wine-1.4.1.tar.bz2 http://mirrors.ibiblio.org/wine/source/1.4/wine-1.4.1.tar.bz2 Binary packages for various distributions will be available