-
-
Save leemcalilly/9a16f43106c788ab6877 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 Album < ActiveRecord::Base | |
attr_accessible :artist, :credits, :title, :year, :song_ids | |
belongs_to :user | |
has_many :albumizations | |
has_many :songs, :through => :albumizations | |
accepts_nested_attributes_for :songs | |
validates_presence_of :user_id | |
validates_presence_of :title | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment