Created
June 7, 2014 04:26
-
-
Save gogogarrett/d96cea8c45670760fc58 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 School < ActiveRecord::Base | |
has_many :students | |
has_many :teachers | |
def to_param | |
"#{id}-#{name.parameterize}" | |
end | |
def to_s | |
name | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment