Sha256: 83a799231666c47eb0555f6c3d0e805d03e21f901e267a6aa54c4667e1275a2a

Contents?: true

Size: 398 Bytes

Versions: 1

Compression:

Stored size: 398 Bytes

Contents

module Fooltip
  module ActiveRecord

    def has_fooltips
      has_many :fooltip_associations, as: :owner, class_name: "Fooltip::Association", dependent: :destroy
      has_many :fooltips, through: :fooltip_associations, source: :container, class_name: "Fooltip::Container"
      accepts_nested_attributes_for :fooltip_associations, reject_if: :all_blank, allow_destroy: true
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fooltip-0.0.13 lib/fooltip/active_record.rb