Rails 4 Routing - undefined local variable -


i have payments table. in index view list payments in table , in show view i'd show form of payments user can select ones further process.

above table in index action view have:

<%= link "customise", show_payment_path %> 

then in controller:

  def show     @payments = payment.all   end 

in routes file:

resources :payments 

the error getting is:

undefined local variable or method `show_payment_path' 

i have tried

<%= link_to 'customise sepa mandate', show_payments_path %> 

as gives same error. using url instead of path.

for make own routes , create own path variable such

resources :payments, except: [:show]    '/show' => "payments#show", on: collection, as: :show end 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -