I have searched many sites for the solution. And maybe there is none
or more likely it is so easy no one mentions it.

The problem is this. I have an class called Event which has a HABTM
relationship with Note.

I can do the following with no problems
 e = Event.new
 e['name'] = 'test'
 e['state'] = 'started'

But I cannot access the notes attribute in the same way
 e.notes << Note.find(:all)
 e.notes.size  #=> 11
 e['notes']  #=> nil

Why is it I can access e.name as e['name'] but not e.notes as e
['notes']?

And is there a work around to access notes only knowing the string
name ("notes")?

Will

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to