21 lines
868 B
Ruby
21 lines
868 B
Ruby
module JamRuby
|
|
class JamTrackLicensor < ActiveRecord::Base
|
|
|
|
table_name = 'jam_track_licensors'
|
|
|
|
validates :name, presence: true, uniqueness: true, length: {maximum: 200}
|
|
validates :description, length: {maximum: 1000}
|
|
validates :attention, length: {maximum: 200}
|
|
validates :address_line_1, length: {maximum: 200}
|
|
validates :address_line_2, length: {maximum: 200}
|
|
validates :city, length: {maximum: 200}
|
|
validates :state, length: {maximum: 200}
|
|
validates :zip_code, length: {maximum: 200}
|
|
validates :contact, length: {maximum: 200}
|
|
validates :email, length: {maximum: 200}
|
|
validates :phone, length: {maximum: 200}
|
|
|
|
has_many :jam_tracks, :class_name => "JamRuby::JamTrack", foreign_key: 'licensor_id', :inverse_of => :licensor
|
|
end
|
|
end
|