I work in a RoR project, and I have several routes that I want to change, how these route routes are displayed in the browser.
My route:
get 'campaigns/:slug' => 'campaigns#show'
Result:
http://localhost:3000/campaigns/cdlcuiaba
What I want:
http://localhost:3000/cdlcuiaba
thanks
Be warned that this is highly discouraged, but can be done as follows (order of questions):
get '/admin' => 'admin:show' get '/:slug' => 'campaigns#show'
EDIT. , , /admin campaigns#show, , . , - , .
/admin
campaigns#show
Source: https://habr.com/ru/post/1608692/More articles:How to load a file and unzip it from memory in clojure? - clojureHow to show color console output in Clion - clionregexp output is not the same - javaPowerMockito: java.lang.NoClassDefFoundError - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1608691/ways-to-return-an-object-in-c-method&usg=ALkJrhhTqP5LiEm9WB5-1c6xE8RM65-pqAC ++: The most efficient and concise way to access a large member variable in a large dataset is c ++Do something visible on the right side after user input - javascriptBest practices web API for deep feature routes - restSearchkick не ищет несколько терминов при указании полей - ruby-on-rails-4about mongoose connectivity - string field - node.jsAll Articles