Sha256: c0a8c8a9ae35d69b04457977ff50dc243be0891c1b2a2c563ba81ec7fbe69148
Contents?: true
Size: 416 Bytes
Versions: 30
Compression:
Stored size: 416 Bytes
Contents
class CustomFieldAnswer < ActiveRecord::Base belongs_to :product belongs_to :custom_field alias_method :set_custom_field, :custom_field= # this module must be included only after belong_to :custom_field definition # this module overrides the dynamic methods which are added by belongs_to include Field def custom_field=(custom_field) set_custom_field(custom_field) extend_module end end
Version data entries
30 entries across 30 versions & 1 rubygems