Module: ActiveRecord::Extensions::FinderOptions::ConstructSqlCompatibility
- Defined in:
- lib/ar-extensions/finder_options.rb
Overview
In Rails 2.0.0 add_joins! signature changed
Pre Rails 2.0.0: add_joins!(sql, options, scope)
After 2.0.0: add_joins!(sql, options[:joins], scope)
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
183 184 185 186 187 188 189 190 191 192 |
# File 'lib/ar-extensions/finder_options.rb', line 183 def self.extended(base) if ActiveRecord::VERSION::STRING < '2.0.0' base.extend ClassMethods base.class_eval do class << self alias_method_chain :add_joins!, :compatibility end end end end |