Module: ActiveRecord::Extensions::FinderOptions::ConstructSqlCompatibility::ClassMethods
- Defined in:
- lib/ar-extensions/finder_options.rb
Instance Method Summary collapse
-
#add_from!(sql, options, scope = :auto) ⇒ Object
pre Rails 2.0.0 the order of the scope and options was different.
-
#add_joins_with_compatibility!(sql, options, scope = :auto) ⇒ Object
:nodoc:.
-
#add_select_column_sql!(sql, options, scope = :auto) ⇒ Object
:nodoc:.
-
#quoted_table_name ⇒ Object
aliasing threw errors.
Instance Method Details
#add_from!(sql, options, scope = :auto) ⇒ Object
pre Rails 2.0.0 the order of the scope and options was different
206 207 208 |
# File 'lib/ar-extensions/finder_options.rb', line 206 def add_from!(sql, , scope = :auto)#:nodoc: sql << " FROM #{(scope && scope[:from]) || [:from] || table_name} " end |
#add_joins_with_compatibility!(sql, options, scope = :auto) ⇒ Object
:nodoc:
195 196 197 198 |
# File 'lib/ar-extensions/finder_options.rb', line 195 def add_joins_with_compatibility!(sql, , scope = :auto)#:nodoc: join_param = .is_a?(Hash) ? : { :joins => } add_joins_without_compatibility!(sql, join_param, scope) end |
#add_select_column_sql!(sql, options, scope = :auto) ⇒ Object
:nodoc:
210 211 212 |
# File 'lib/ar-extensions/finder_options.rb', line 210 def add_select_column_sql!(sql, , scope = :auto)#:nodoc: sql << "#{[:override_select] || (scope && scope[:select]) || [:select] || '*'}" end |
#quoted_table_name ⇒ Object
aliasing threw errors
201 202 203 |
# File 'lib/ar-extensions/finder_options.rb', line 201 def quoted_table_name#:nodoc: self.table_name end |