Sha256: fa65986227ea7c0c22bafdcd95b278a34b680e822bbd507a3ad3b69e9a6dea53
Contents?: true
Size: 381 Bytes
Versions: 42
Compression:
Stored size: 381 Bytes
Contents
module Piggybak module ActsAsVariant extend ActiveSupport::Concern module ClassMethods def acts_as_variant has_one :piggybak_variant, :as => "item", :class_name => "::Piggybak::Variant" accepts_nested_attributes_for :piggybak_variant, :allow_destroy => true end end end end ::ActiveRecord::Base.send :include, Piggybak::ActsAsVariant
Version data entries
42 entries across 42 versions & 1 rubygems