about summary refs log tree commit diff stats
path: root/app/models/concerns/recordable.rb
blob: bbbb582ea363ac19aea4c633ec14decad90142cc (plain) (blame)
1
2
3
4
5
6
7
8
9
module Recordable
  extend ActiveSupport::Concern

  included do
    has_many :records, as: :recordable, inverse_of: :recordable

    accepts_nested_attributes_for :records, allow_destroy: true
  end
end