Sha256: c6ca1100a98dde191f69efb21d652c8552c20d206b2c29376950d6d35c6cd054
Contents?: true
Size: 437 Bytes
Versions: 8
Compression:
Stored size: 437 Bytes
Contents
module PushType class AssetField < RelationField options template: 'asset' def relation_class PushType::Asset end on_instance do |object, field| object.class_eval do define_method(field.relation_name.to_sym) do field.relation_class.not_trash.find field.json_value unless field.json_value.blank? end unless method_defined?(field.relation_name.to_sym) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems