Sha256: 54477949ae1798ac2a2ccd787ebaff1131668dfbb52c3982b102a3639df58233

Contents?: true

Size: 278 Bytes

Versions: 12

Compression:

Stored size: 278 Bytes

Contents

module Concerns
  module ContentType
    extend ActiveSupport::Concern

    included do
      after_save -> { column.touch if column.present? }
    end

    def column
      ContentColumn.find_by(content: self)
    end

    def parent
      column.row.rowable
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
udongo-5.7.0 app/models/concerns/content_type.rb
udongo-5.6.0 app/models/concerns/content_type.rb
udongo-5.5.0 app/models/concerns/content_type.rb
udongo-5.4.0 app/models/concerns/content_type.rb
udongo-5.3.1 app/models/concerns/content_type.rb
udongo-5.3.0 app/models/concerns/content_type.rb
udongo-5.2.0 app/models/concerns/content_type.rb
udongo-5.1.0 app/models/concerns/content_type.rb
udongo-5.0.2 app/models/concerns/content_type.rb
udongo-5.0.1 app/models/concerns/content_type.rb
udongo-5.0.0 app/models/concerns/content_type.rb
udongo-4.0.0 app/models/concerns/content_type.rb