Ruby on Rails
Sunday, October 15, 2017
Great, thanks, almost there. Mine is slightly different as its not based on CRUD, its a ruby view based on a SQL view. So
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
-- 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 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+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/65bc12ae-50da-4fb5-b111-0c19a9a49c30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment