Ruby on Rails
Monday, March 5, 2018
you are correct. the space and or the period was the problem here.
ill try out different solutions now
thx all!
On Mon, Mar 5, 2018 at 2:15 PM, Rob Biedenharn <rob.biedenharn@gmail.com> wrote:
--On 2018-Mar-5, at 13:15 , Hassan Schroeder <hassan.schroeder@gmail.com> wrote:On Mon, Mar 5, 2018 at 9:59 AM, tom <tomabroad@gmail.com> wrote:so how can i pass this along? why is it not assuming html?
Because computers don't make assumptions? 😀
Why are you telling it to respond differently depending on the format
and then *not providing a format*??
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote> Started GET "/whatever/in/St.%20Peters" for 10.0.1.37 at 2018-03-05 12:09:39 -0500> Processing by FooController#index asYou really should have added one more line from the log here.It was very likely looking for a :format => '%20Peters" because of the '.' in the URL path.Look at the output from `rails routes` to see the various ways that you might be routing to foos#indexAnother way to fix this tends to "break" having multiple formats. You can add:> eg:> match 'whatever/in/:seoterm' , as: 'seo_whatever _in' , :to => 'foos#index', via: [:get] , :mode=>{:x=>' whatever ',:y=>1} , constraints: { seoterm: /.+/ }so that :seoterm slurps all the remaining characters of the URL. This breaks the "implicit" (.:format) that gets added because the constraint will match the '.' and everything after it leaving nothing to match the "optional" format.-Rob
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com .
To post to this group, send email to rubyonrails-talk@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .45979B90-B83A-4EB9-9770- 7E2C222E0620%40gmail.com
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMfcOW%3DxcUT1hZrqH_0p6qPdo%2BjiNpDxJNOPuBTaXeyF3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment