PS I also tried 

get 'upcoming_events/cost', to: 'upcoming_events#index'


On Sunday, October 15, 2017 at 6:49:10 PM UTC+1, Ben Edwards wrote:
>
> Great, thanks, almost there.  Mine is slightly different as its not based 
> on CRUD, its a ruby view based on a SQL view.  So 
>
> get '/patients/:id', to: 'patients#show'
>  
>
> Is not quite what I need.  If I have this view as root view (
> http://domain.tld) and want to pass cost as a variable (
> http://domain.tld?cost=cheapevents = http://domain.tld/cheapevents). Its 
> the site root
>
> currently I have 
>
> root 'upcoming_events#index'
>
> *get* 'upcoming_events/index'
>
>
> I tried
>
> *get* 'upcoming_events/index:cost', to: 'upcoming_events#index'
>
>
> And it works for root but if I try *http://domain.tld/cheapevents 
> <http://domain.tld/cheapevents>* I get 
>
> No route matches [GET] "/cheapevents"
>
>
>
>
>
>

-- 
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/c732fd97-440f-4e19-922f-4f8182d3d6b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to