Hi, i have a, probably, simple problem requiring a simple solution. I
simply want to add a regexp for the id, so that a username can be used
as the id, instead of just an integer. I did that by adding this to
routes.rb:
map.resources :users, :active_scaffold => true, :requirements => { :id
=> \[\w+\] }
I can now click each of the default "Edit" "Delete" and "Show" action
links in the default list view.
However, if i want to "Close" the details of a row, after clicking the
"Show" button above, i get the following error:
ActionController::RoutingError (No route matches "/users/tim/row" with
{:method=>:get}):
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
routing/recognition_optimisation.rb:66:in `recognize_path'
etc. etc.
If i change my URL to something like "/users/1/row", then it
recognizes the route, but of course, fails to find the record with
username == 1.
Seems like there should be a simple solution to this, however, i am
not able to find it. Can anyone help? Thanks!!!
Jae
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---