ruby on rails - Can't use link path -
Hello I'm a new one in Ruby on Rails. I have encountered strange behavior
I add a link
and get it
undefined local variable or method `diary_add_record_path '
But when I use a different route Use (main diary) it works fine Someone can tell me what is wrong with it.
has two options
i) Add a custom root name and use it
get 'diary / add_record', for: 'add diary' ,: as = & gt; Add_diary
gets your link
link = 'Добавить запись', add_diary_path ,: remote = & gt; Truth: 'Data-Type' = & gt; 'Html' ,: id = & gt; 'New record-link'% & gt; ii) Rake the rake and locate the root rail generated for your path
the rake roots | Grep 'add_record'
and use it in your link
Comments
Post a Comment