For examples. I have: examples.com/john John isn''t a controller but an id I want pass john to a method od a controllerfor example examples.com/index/john Is possible with rails and without .htaccess? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
dont understand, are you trying to send the id to the method when someone clicks on something or through a form??? Whats did you intend to happen when you pass the id to the controller? Oh and by the way, you have to pass to the controller, its impossible as far as i know to communicate directly with the model from the view. Then again, that might just be ingrained as a good practice. On Feb 27, 4:04 pm, Luca Roma <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> For examples. > I have: > > examples.com/john > > John isn''t a controller but an id > > I want pass john to a method od a controllerfor example > examples.com/index/john > > Is possible with rails and without .htaccess? > Thanks > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> For examples. > I have: > > examples.com/john > > John isn''t a controller but an id > > I want pass john to a method od a controllerfor example > examples.com/index/john > > Is possible with rails and without .htaccess?Yes. You''ll want to setup a route something like: map.connect '':id'', :controller => ''mycontroller'', :action => ''myaction'' And you''ll want to think carefully about where that goes in your routes.rb so as not to mess up the default routes. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---