Created
August 3, 2012 13:35
-
-
Save enricostano/3247748 to your computer and use it in GitHub Desktop.
modelli
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 Project < ActiveRecord::Base | |
attr_accessible :name, :start, :stop | |
belongs_to :institution | |
validates :name, :start, :stop, :presence => true | |
end | |
class Institution < ActiveRecord::Base | |
attr_accessible :email, :name, :phone | |
has_many :projects, :dependent => :destroy | |
validates :email, :name, :phone, :presence => true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment