pass name and values in link_tag

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
Company Name n

how to pass name and value to link_to tag?

kanna(9742665400)

The values appear in the link tag, just as you requested. Perhaps you’re intending to pass them as parameters to /deals/search somehow?

To help people answer this question, you should include the Javascript code that’s reading data-url and data-searchurl so that it can be determined exactly what that code is looking for…

–Matt Jones

PS: multiple-posting your question is not generally considered a useful way to produce answers faster. :slight_smile:

hi Bryan

its not coming.