Sha256: f570b809d9525937b1de2dbf63307a37d71e3cca6c3a7d152bfad0928401f7c8

Contents?: true

Size: 485 Bytes

Versions: 6

Compression:

Stored size: 485 Bytes

Contents

class ContentColumn < ActiveRecord::Base
  include Concerns::Sortable
  sortable(scope: :row_id)

  belongs_to :row, class_name: 'ContentRow', touch: true
  belongs_to :content, polymorphic: true, dependent: :destroy

  validates :row, presence: true
  validates :width_xs, :width_sm, :width_md, :width_lg, :width_xl,
            presence: true,
            numericality: { greater_than: 0, less_than_or_equal_to: 12,  only_integer: true }

  default_scope -> { order(:position) }
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
udongo-1.0.4 app/models/content_column.rb
udongo-1.0.3 app/models/content_column.rb
udongo-1.0.2 app/models/content_column.rb
udongo-1.0.1 app/models/content_column.rb
udongo-1.0.0 app/models/content_column.rb
udongo-0.1.0 app/models/content_column.rb