I think it makes sense that a Prestatair should be nested under a User.
But your routes file does not do any nesting yet. I would recommend to nest
the routes as such:
resources :users do
After doing this,
@user = User.find(params[:user_id])
should work... but you may also see other issues at that point that you'll
have to fix. The reason that line will work now lies in the fact that you
will now have that
params[:user_id] present in the params
hash, as provided by the nested :users routes. For more...
bundle exec rake routes to see what routes and
named_route name the above nesting creates and update your code