Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6955543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:45:00+00:00 2026-05-27T14:45:00+00:00

Rails 2.3.5 For a link_to tag, I’m trying to pin down the syntax for

  • 0

Rails 2.3.5

For a “link_to” tag, I’m trying to pin down the syntax for sending extra parameters and specifying a class. I’m using the jQuery UI library to change links into buttons with a class of ‘link_button’.

This sends the extra ‘min_max’ parameter, but the class will not be applied:

<%= link_to "CLICK HERE", :action => 'edit', :id => @threshold_control.id, :min_max => 'different', :class => 'link_button' %>

This is not sending the extra ‘min_max’ parameter, but the ‘link_button’ class is applied:

<%= link_to 'CLICK HERE',edit_threshold_control_path(@threshold_control.id), :min_max => 'different',  :class => 'link_button' %>

I haven’t seen a specific example of extra link_to parameters AND a class specified, and none of my guesses at the syntax needed for both things to work at the same time have worked. Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:45:01+00:00Added an answer on May 27, 2026 at 2:45 pm

    Try:

    <%= link_to "CLICK HERE", { :action => 'edit', :id => @threshold_control.id, :min_max => 'different' }, { :class => 'link_button' } %>
    

    link_to expects two hashes after the name of the link. If you don’t use curly braces there is no way to know when the first hash ends and the second hash starts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Ruby on Rails with jQuery and trying to do the following: <%=
I'm sending a ms-word file using rails. i.e when I click on a link,
I'm using acts_as_taggable_on_steroids plugin with rails 2.3.5 to build a tag cloud and I'm
I managed to get Ajax working in Rails, specifically using remote_form_for tag to add
So I'm trying to get some basic jQuery code with Rails working, but it
This tag with rails 3 <%= link_to 'Destroy', item, :method => :delete,:confirm=>'Are you sure?'
Rails 2.3.5 For a link_to image_tag', I've been trying to figure out how to
I am trying to get a form tag working in rails 3 but I
link_to delete redirecting to show action instead of going to destroy action in rails
I'm pretty new to Rails templates. Here's my current code: <li><%= link_to Home, /path1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.