Ruby on Rails
Monday, July 29, 2013
hi i passed name and value in link_to but its not taking?
<%if params[:deals][:company_name] !=nil && params[:deals][:company_name] == "dsec" %>
<%= link_to "Company Name d","javascript:void(0)",:class=>"get_page decending",:name=>"deals[company_name]",:value=>"asc","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%elsif params[:deals][:company_name] !=nil && params[:deals][:company_name] == "asc"%>
<%= link_to "Company Name a","javascript:void(0)",:class=>"get_page ascending",:name=>"deals[company_name]",:value=>"dsec","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%else%>
<%= link_to "Company Name n","javascript:void(0)",:class=>"get_page",:name=>"deals[company_name]",:value=>"dsec","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%end%>
in browser
<a class="get_page" value="dsec" name="deals[company_name]" data-url="1" data-searchurl="/deals/search" href="javascript:void(0)">Company Name n</a>
how to pass name and value to link_to tag?
<%if params[:deals][:company_name] !=nil && params[:deals][:company_name] == "dsec" %>
<%= link_to "Company Name d","javascript:void(0)",:class=>"get_page decending",:name=>"deals[company_name]",:value=>"asc","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%elsif params[:deals][:company_name] !=nil && params[:deals][:company_name] == "asc"%>
<%= link_to "Company Name a","javascript:void(0)",:class=>"get_page ascending",:name=>"deals[company_name]",:value=>"dsec","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%else%>
<%= link_to "Company Name n","javascript:void(0)",:class=>"get_page",:name=>"deals[company_name]",:value=>"dsec","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%end%>
in browser
<a class="get_page" value="dsec" name="deals[company_name]" data-url="1" data-searchurl="/deals/search" href="javascript:void(0)">Company Name n</a>
how to pass name and value to link_to tag?
kanna(9742665400)...........
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPtiWRAL0ELbYbeh1eoCs5v0eusx67_hBwuT0DmszhV567PTrA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment