Sha256: 0da868c3dd954baf73b54ea0e4973f81c15a1fb1f873450e48a38aa1f0cae3e9
Contents?: true
Size: 554 Bytes
Versions: 12
Compression:
Stored size: 554 Bytes
Contents
class ActiveRecord::Reflection::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
Version data entries
12 entries across 12 versions & 1 rubygems