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" %>
*
<% end %>
*
*

*
routes.rb

resources :billerpages
*
*
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
*
*
*
*
*
*
*
*
*
*
*
*

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zHXXQWtV9LUJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Colin Law at Apr 21, 2012 at 8:18 pm

    On 21 April 2012 19:21, amvis wrote:
    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" %>
    <% end %>

    routes.rb

    resources :billerpages

    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...?
    Trying to help, but don't understand the question. What does "But
    here even didn't click the get button, billepage will call.....?"
    mean? Please try again.

    Colin
    Thank you
    vishnu






    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/rubyonrails-talk/-/zHXXQWtV9LUJ.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Amvis at Apr 22, 2012 at 5:16 am

    On Saturday, 21 April 2012 16:18:16 UTC-4, Colin Law wrote:
    On 21 April 2012 19:21, amvis wrote:
    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" %>
    <% end %>

    routes.rb

    resources :billerpages

    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...?
    Trying to help, but don't understand the question. What does "But
    here even didn't click the get button, billepage will call.....?"

    Thanks colin, i have got it, just i made a mistake..

    Thank you
    vishnu

    >

    mean? Please try again.
    Colin
    Thank you
    vishnu






    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/rubyonrails-talk/-/zHXXQWtV9LUJ.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/2Js2WktsUagJ.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedApr 21, '12 at 6:21p
activeApr 22, '12 at 5:16a
posts3
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Amvis: 2 posts Colin Law: 1 post

People

Translate

site design / logo © 2022 Grokbase