Hmm, another tangential solution...

* Go for nested routes.
foo_app/users should work as you stated
foo_app/users/1/bills will only show the user's bills via AS's nested
routing behaviour
foo_app/bills should fail with some sensible error message to the user

* To make foo_app/bills fail, implement a before_filter. Here is a
quick conceptual code (fix for any errors)

BillsController ...
  before_filter :user_id_parameter_is_mandatory

end

ApplicationController ...
   def user_id_parameter_is_mandatory
      render :text => 'sensible error' unless params[:user_id]
  end
end

Note: If you choose to use this approach, you will have to look at all
the places where your custom code is linking to BillsController. AS
generated links should be fine (I hope).

Pradeep
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to