Created
January 6, 2010 21:33
-
-
Save anonymous/270690 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
## I seem to have lost my base models - I had obtained them already from pre-existing tables. | |
Basically, this relates to one table, a model and a subclass, which I thought would be quite short. | |
class Person < ActiveRecord::Base | |
has_one :address | |
has_one :phone | |
belongs_to :district | |
end | |
class Member<Person | |
def | |
## The following line is the bit that I do not know how to do. | |
member?; mem == true | |
end | |
create_table "people", :force => true do |t| | |
t.integer "roll" | |
t.integer "district_id" | |
t.text "title" | |
t.text "forenames" | |
t.text "surname" | |
t.boolean "mem" | |
t.datetime "created_at" | |
t.datetime "updated_at" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment