Sha256: ce1a7e52db6edaaee8910482067545f148e545191033dd045eb309499f3e8fa4
Contents?: true
Size: 678 Bytes
Versions: 12
Compression:
Stored size: 678 Bytes
Contents
module ActiveRecord module Reflection class AssociationReflection alias_method :association_name, :name def klass_with_create_polymorphic_class if options[:polymorphic] begin klass_without_create_polymorphic_class rescue NameError => e Object.class_eval "class #{e.missing_name} < ActiveRecord::Base; self.table_name = '#{active_record.name.tableize}'; def self.hobo_shim?; true; end; end" e.missing_name.constantize end else klass_without_create_polymorphic_class end end alias_method_chain :klass, :create_polymorphic_class end end end
Version data entries
12 entries across 12 versions & 1 rubygems