Title: Re: [Rails] A truly default route
Walter,

This is WAAAY above my head.

Would you please give an explanation?  Are both lines necessary?

Ralph



Thursday, February 22, 2018, 7:05:30 PM, you wrote:

WLD> Here's the bottom of one of my routes.rb files:

WLD>   # this has to be the last option in order to work with unprefixed routes
WLD>   get '/:slug', to: 'pages#show', constraints: lambda {
WLD> |request| Page.pages.include? request.path_parameters[:slug] }
WLD>  
WLD>   get "*any", via: :all, to: "errors#not_found"

WLD> That's not exactly what you asked for, but it's fairly close.

WLD> Walter

>> On Feb 22, 2018, at 6:21 PM, Ralph Shnelvar <
ral...@dos32.com> wrote:

>> What would routes.rb look like if I want EVERYTHING to go to a controller action called, hmm, 'everything' in static_pages.rb?

>> Ralph Shnelvar

>> --
>> 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+unsubscr...@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/1746028995.20180222162144%40dos32.com.
>> For more options, visit
https://groups.google.com/d/optout.




Ralph

--
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+unsubscr...@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/1366615011.20180222195308%40dos32.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to