Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/marty/monkey.rb

Direct Known Subclasses

Marty::Base

Class Method Summary collapse

Class Method Details

.joins(*args) ⇒ Object



281
282
283
284
285
286
287
288
289
# File 'lib/marty/monkey.rb', line 281

def joins(*args)
  # when joins args are strings, checks to see if they're
  # associations attrs.  If so, convert them to symbols for joins
  # to work properly.
  new_args = args.map do |a|
    reflections.key?(a) ? a.to_sym : a
  end
  old_joins(*new_args)
end

.old_joinsObject



279
# File 'lib/marty/monkey.rb', line 279

alias_method :old_joins, :joins