Sha256: 6feebd7d761585367134c6c5d73630cceb3672f7b16b7c467910139c4fb7b9b0
Contents?: true
Size: 642 Bytes
Versions: 11
Compression:
Stored size: 642 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; set_table_name '#{active_record.name.tableize}'; 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
11 entries across 11 versions & 1 rubygems