The scaffold command is the following
ruby script\generate scaffold Leave employee_id:integer leave_type_id:integer date:date
I know I could change the name but I just wonder why it always throws undifined new_leave_path
Glad to know your brilliant thoughts.
Below is the full details of the error:
NameError in Leaves#index
Showing app/views/leaves/index.html.erb where line #26 raised:
undefined local variable or method `new_leave_path' for #<ActionView::Base:0x620ea70>
Extracted source (around line #26):
23:
24: <br />
25:
26: <%= link_to 'New leave', new_leave_path %>
Application trace:
app/views/leaves/index.html.erb:26
app/controllers/leaves_controller.rb:7:in `index'