apneadiving/Google-Maps-for-Rails — Issue #145: association vs nested resources
Author: erwin
Created: 2012-01-30 12:09:17+00:00
State: open

I don't understand the information given in the wiki about it ... ( maybe I missed a point ...°

portfolio has_many projects project has_many payments ( association, not nested resources in routes)

writing this ability raises an error : ( no nested resource in routes)
can :read, Payment, :project => { :id => portfolio.projects.map{|p| p[:id] } }

but writing that, is OK ...
can :read, Payment, :project_id => portfolio.projects.map{|p| p[:id]}

is that correct ?