Rails тег link_to не обновляет URL - PullRequest
0 голосов
/ 20 ноября 2018

код моей страницы просмотра:

<li class="list-group-item">
  <%= link_to 'Job folder', cader_job_folder_path , class: '', title: '', data: {toggle: 'tooltip'} %>
</li>

Routes.rb как:

  namespace :cader do
    get '/caders/index', to: 'caders#index', as: 'index'
    get '/caders/available', to: 'caders#available_jobs', as: 'available_job'
    post '/caders/checkout/:id', to: 'caders#checkout_job', as: 'checkout_job'
    get '/caders/checkin/', to: 'caders#check_in_job', as: 'check_in_job'
    post '/caders/update_job/', to: 'caders#update_job', as: 'update_job'
    get '/caders/update_job/', to: 'caders#update_job'
    post '/caders/delete_job/', to: 'caders#delete_job', as: 'delete_job'
    get '/caders/submit_job', to: 'caders#submit_job', as: 'submit_job'
    post '/caders/create_order', to: 'caders#create_order', as: 'create_order'
    get '/caders/release_job', to: 'caders#release_job', as: 'release_job'
    post '/caders/submit_complete_job', to: 'caders#submit_complete_job', as: 'submit_complete_job'
    get '/caders/downloads', to: 'caders#downloads', as: 'downloads'
    get '/caders/history', to: 'caders#history', as: 'history'
    get '/caders/download_job', to: 'caders#download_job', as: 'download_job'
    get '/caders/job_folder', to: 'caders#job_folder', as: 'job_folder'

    get '/update', to: 'caders#update', as: 'update'
    get '/jobs/completed', to: 'jobs#completed', as: 'view_completed_jobs'
    get '/jobs/all', to: 'jobs#all', as: 'all_jobs'
    get '/jobs', to: 'jobs#index', as: 'jobs'
  end

консольный вывод:

  cader_update_job POST       /cader/caders/update_job(.:format)                                                       cader/caders#update_job
                           cader_delete_job POST       /cader/caders/delete_job(.:format)                                                       cader/caders#delete_job
                         cader_create_order POST       /cader/caders/create_order(.:format)                                                     cader/caders#create_order
                  cader_submit_complete_job POST       /cader/caders/submit_complete_job(.:format)                                              cader/caders#submit_complete_job
                                cader_index GET        /cader/caders/index(.:format)                                                            cader/caders#index
                        cader_available_job GET        /cader/caders/available(.:format)                                                        cader/caders#available_jobs
                         cader_checkout_job POST       /cader/caders/checkout/:id(.:format)                                                     cader/caders#checkout_job
                         cader_check_in_job GET        /cader/caders/checkin(.:format)                                                          cader/caders#check_in_job
                    cader_caders_update_job GET        /cader/caders/update_job(.:format)                                                       cader/caders#update_job
                           cader_submit_job GET        /cader/caders/submit_job(.:format)                                                       cader/caders#submit_job
                          cader_release_job GET        /cader/caders/release_job(.:format)                                                      cader/caders#release_job
                            cader_downloads GET        /cader/caders/downloads(.:format)                                                        cader/caders#downloads
                              cader_history GET        /cader/caders/history(.:format)                                                          cader/caders#history
                         cader_download_job GET        /cader/caders/download_job(.:format)                                                     cader/caders#download_job
                           cader_job_folder GET        /cader/caders/job_folder(.:format)                                                       cader/caders#job_folder
                               cader_update GET        /cader/caders/update(.:format)                                                           cader/caders#update
                  cader_view_completed_jobs GET        /cader/caders/jobs/completed(.:format)                                                   cader/jobs#completed
                             cader_all_jobs GET        /cader/caders/jobs/all(.:format)   

Но если я нажму нассылка на него изменяет страницу, но URL остается таким же, как: http://localhost:3000/cader/caders/index Но ссылки на другие имена работают нормально.пожалуйста, подскажите, если я что-то делаю не так
Заранее спасибо

...