Sha256: ac071fd07dd503e1476dc4f1d83bc78d30c0246f490731d3595dee13d32c2d38

Contents?: true

Size: 426 Bytes

Versions: 2

Compression:

Stored size: 426 Bytes

Contents

module BitPlayer
  # A section of an application.
  class Tool < ActiveRecord::Base
    has_many :content_modules,
             class_name: "BitPlayer::ContentModule",
             foreign_key: :bit_player_tool_id,
             inverse_of: :tool,
             dependent: :destroy
    validates :title, presence: true
    validates :position, uniqueness: true
    validates :is_home, inclusion: { in: [true, false] }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bit_player-0.2.1 app/models/bit_player/tool.rb
bit_player-0.2.0 app/models/bit_player/tool.rb