Created
July 31, 2018 04:30
-
-
Save leemcalilly/de615ea146159bb19059f5b68ad410c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Artist < ApplicationRecord | |
belongs_to :user | |
has_many :spoken_quotes, class_name: "Quote", foreign_key: :speaker_id | |
has_many :topic_quotes, class_name: "Quote", foreign_key: :topic_id | |
validates :user_id, presence: true | |
validates :name, presence: true, length: { maximum: 120 }, | |
uniqueness: { case_sensitive: false } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment