Nested Resources Issues

I have the following in my routes file:

resources :users, :path => ‘ronin’ do
resources :notes, :path => ‘moras’
resources :collections, :path => ‘haiku’

If use user.collections I get all the collections owned by the user.
How ever if use user.notes I get

NoMethodError: undefined method `notes’ for

What am I missing here?


Forgot to add has_many :notes in my user model.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs