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 6901223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:38:46+00:00 2026-05-27T07:38:46+00:00

This is the code I have in rails 3.1 <%= link_to ‘All’,:action => bycategory,

  • 0

This is the code I have in rails 3.1

<%= link_to 'All',:action => "bycategory", :id => 'All', :remote => true %>

I have defined a js.erb. This code works perfectly fine i.e invokes the JS when put in table with a certain CSS. When I just change the table id or put in a unordered list or anywhere else, it gives me template error as it looks for the html.erb. Just beats me :(.

one thing I found is that in the Params in the first case apart from the id and the remote , it also sends timestamp
In the second case time stamp is missing. Not sure why this is happening
Any help will be appreciated, have spent too much time debugging this

  • 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-27T07:38:47+00:00Added an answer on May 27, 2026 at 7:38 am

    You might want to put the :action => “bycategory” and :id => ‘All’ in a hash as

    <%= link_to 'All', { :action => "bycategory", :id => 'All' }, :remote => true %>
    

    This will generate the proper html attribute i.e. data-remote=”true” otherwise it will simply treat everything following as an http request attribute. Your code will generate –

    <a href="/bycategory?id=All&amp;remote=true">All</a>
    

    whereas using the hash will generate something similar to

    <a data-remote="true" href="/bycategory/All">All</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[Rails] Where to put this code? I have a user1 and when another registered
I am creating a rails app and have used this code in one of
So I have this code that takes care of command acknowledgment from remote computers,
I'm relatively new to Ruby on Rails. As of now have this working code
I have this code: = link_to unsubscribe instantly, *|UNSUB|*.html_safe That generates this HTML: <a
I have code like this in a Rails 3 app I'm working on <%
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to
So I have this code for these Constructors of the Weapon class: Weapon(const WeaponsDB
Suppose I have this code: var myArray = new Object(); myArray["firstname"] = "Bob"; myArray["lastname"]
So I have this code in a google app engine template: <select name='voter'> {%

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.