Answer the question
In order to leave comments, you need to log in
How to properly make a page jump button with rails tools?
Hello. I'm learning ruby on rails, one moment is incomprehensible, because of which I can't go further. Namely:
The idea so far is this - you need to create a button on one page (home) that will send us to another page. There is a controller on both pages (empty, not a single action is written) and a view. The home page view, where the button should be, contains the code
<%= form_for :home do |f| %>
<%= f.submit('Перейти далее') %>
<% end %>
get 'home/home'
root 'home#home'
resources :input_page
Answer the question
In order to leave comments, you need to log in
Try like this:
<%= form_for :home, :url => {:controller => 'input_page'} do |f| %>
<%= f.submit('Перейти далее') %>
<% end %>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question