Multiple habtm tables comination

Hi.

I need to make a habtm relation between a user model and the permissions
model, a pages model and the permissions model.

If i do this in the routes: map.resources :users, :has_many => [ :permissions ] so that I can access the permissions though the
users controller. But this generates a parameter named user_id, but if I
do the same routing with the pages, I can access the permissions through
pages, but this generates a pages_id parameter.

So how do i change the parameter to something like parent_id so i can
sort without having to make a lot of if-loops to check which parameters
have been set.

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