Just started learning Rails (3). I am tearing my hair out trying to find how to do something presumably utterly trivial: access the value of a model instance's field, from inside a method on that model.
In my case:
def formal_name
@title + " " + @forename + " " + @surname
end
All three @properties (which are all fields on the table in the database) return nil
. They shouldn't.
Incredibly, how to access fields isn't discussed at http://guides.rails.info/, and google turns up nothing.
BTW, I'm coming from Django where this stuff is obvious.