I dn't knw, this is a stupid question, anyway i am shows here. I just scare about form_tag, because, if we try with html form,we will define the action, so When i click on that button, the page will re-directed to the another page, which i mentioned in the action. Here i have one page
billerpage.html.erb
<%= form_tag( { :controller => 'billerpages', :action => 'billerpage' }) do %>
<%= text_field_tag('mnum' ,nil, :class => "input-xlarge") %>
<%= submit_tag "Get", :id => "getpage", :class => " btn btn-large btn-primary" %>
billerpages_controller
def billerpage
puts "here in the pages...."
end
end
Here the problem is, when i load the page billerpage.html.erb, i can see the "here in the pages...." in log. My doubt is, whenever we click on the get button, the form action will execute. But here even didn't click the get button, billepage will call.....?
What am i wrong...?
Thank you
vishnu