On Aug 25, 6:38 pm, CoolAJ86 <[email protected]> wrote:
> > > The directory has a few pieces.
> > > * The photo directory is sorted by group
> > > * The appendix is sorted by last name
>
> > > I want the appendix to show the page number on which the person is
> > > printed, but I don't want to store that in the database.
>
> > An activerecord object is a normal ruby object - it can have non
> > database store instance variables if you want.
>
> but when I do this:
> contact.page_number = page_number
Well yes - you still need to write the accessor methods to store you
instance variables (attr_accessor is probably enough).
Fred
> where page_number doesn't exist in db/migrate/001_create_contacts.rb
> or app/model/contacts.rb
> I get this:
> undefined method `page_number=' for #<Contact:0xb6bbb5b4>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---