I feel really silly right now but can''t get past a weird error: user_update_url failed to generate from {:controller=>"users", :id=>10, :action=>"update"}, expected: {:controller=>"users", :action=>"update"}, diff: {:id=>10} Extracted source (around line #7): 4: <div class="main"> 5: 6: <div class="welcome"> 7: <% form_tag user_update_url(:id => self.current_user.id), :method => ''post'', :class => ''editing inline'' do %> 8: <h2>Welcome <span><%= current_user.name %></span></h2> 9: <div class="tagline"> 10: <% if current_user.attribute_present? ''tagline'' %> The really weird problem is that I only get this error when the user has an ID over 9. The ID is set as a bigint in mysql. What should I be looking for to solve this problem? The route for that URL looks like this: map.user_update ''users/:id/update'', :controller => ''users'', :action => ''update'', :requirements => { :id => /\d/ } Thanks, Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve figured it and and feel pretty stupid. ;) Did you catch my problem? It''s the routes requirements was looking for a single digit: requirements => { :id => /\d/ } The change was to simply add a "+": requirements => { :id => /\d+/ } Ha ha. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
:-) I both love it and hate it when I do things like that. The 9 was a big giveaway, though. It would have been my first guess: a constraint on a single digit. Glad you caught it, though. Now you are your own mentor! -Danimal On Mar 30, 6:00 pm, Mozmonkey <JeremyMail...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve figured it and and feel pretty stupid. ;) Did you catch my > problem? It''s the routes requirements was looking for a single digit: > > requirements => { :id => /\d/ } > > The change was to simply add a "+": > > requirements => { :id => /\d+/ } > > Ha ha.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---