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

  • Home
  • SEARCH
  • 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 8555433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:07:19+00:00 2026-06-11T15:07:19+00:00

I am using Ruby on Rails to create my application and using THIN server

  • 0

I am using Ruby on Rails to create my application and using THIN server on heroku.

Currently using Rails 3.2.8

I ran into this bizzar behavior that I don’t understand.

A link was created using the link_to helper within the nav bar. I want to explicitly use the HTTP GET method so my ruby code was written like so:

<%=link_to "FAQ",help_path,:method=> :get %>

The resulting html looks like so:

<a data-method="get" href="/en/help">FAQ</a>

If I run rake routes, help_path appears like this:

help        (/:locale)/help(.:format)          static_pages#Help {:locale=>/en}

However, when I take a look at what is going on with the URL in Firebug (using the Net tab), it looks like POST was used instead of the GET method.
So instead of seeing:

GET help

this was seen instead:

POST help

If I remove the explicit call for get method like so:

<%=link_to "FAQ",help_path %>

which results in this:

<a href="/en/help">FAQ</a>

Then, in firebug -> Net, I won’t even see this URL: GET help

Under the URL column, it will show this instead:

? undefined 

Wehn the URL is undefined, the Rails app on heroku will attempt to load every asset file individually, instead of loading precompiled manifest asset file.

Has anyone experience this situation? I cannnot quite figure out where in the magical black box of Rails or heroku or the thin server could be changing the behavior of the get and post method.

Any suggestions is greatly appreciated!

  • 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-06-11T15:07:20+00:00Added an answer on June 11, 2026 at 3:07 pm

    I will start saying that I don’t see a reason why to make a link_to and explicitly state :get as the :method. It is the default behavior anyway.

    To your question: You see a POST request because when you use the :method option of link_to it generates a form which posts to the desired URL and a _method hidden input with the desired request type (POST/PUT/DELETE/GET). Rails knows how to deal with POST requests which include the _method param and responds with the proper route. In your case – the route which matches the GET action.

    You can read more on link_to here.

    EDIT:

    I read the documentation more thoroughly and it looks like the :method option does not support :get as a value.

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

Sidebar

Related Questions

Novice here! I'm currently creating an application using Ruby on Rails. This particular application
I'm using Ruby on Rails to make an application where businesses can create accounts
I am considering developing an application using Ruby on Rails that is a planner
I am using NetBeans to create my first Ruby on Rails application. Is there
I am running a Ruby 1.8.6, Rails 1.2 application on Heroku. I am using
I am using Ruby on Rails 3 and I have a monolithic application that
Trying to create a simple flickr application using Ruby on Rails 3.2.3, I faced
I have created a blog application using Ruby on Rails which includes the ability
I have a Rails 3.2.2 application using Ruby version 1.9.2. I have created basic
I was recently given a task to create a blog using Ruby on Rails.

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.