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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T09:39:49+00:00 2026-05-14T09:39:49+00:00

Hi i have this starnge behavoir… <%= link_to image_tag(image.png), brain_path(1), :method => put %>

  • 0

Hi i have this starnge behavoir…

<%= link_to image_tag("image.png"), brain_path(1), :method => "put" %>

produces:

<a href="/brain.1" onclick="var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.met ...[many rails code]... ;return false;"><img alt="Research_4" src="/images/image.png" /></a>

a href=”/foobar.1″ this is the strange part 🙁 any ideas whqt is causing this?

rake routes gives the following:

new_brain GET /brain/new(.:format) {:controller=>”brains”, :action=>”new”}

   edit_brain GET    /brain/edit(.:format)              {:controller=>"brains", :action=>"edit"}
        brain GET    /brain(.:format)                   {:controller=>"brains", :action=>"show"}
              PUT    /brain(.:format)                   {:controller=>"brains", :action=>"update"}
              DELETE /brain(.:format)                   {:controller=>"brains", :action=>"destroy"}
              POST   /brain(.:format)                   {:controller=>"brains", :action=>"create"}
  • 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-14T09:39:50+00:00Added an answer on May 14, 2026 at 9:39 am
    1. How do you route your foobar? (singular or plural? resource or resources?)

    2. Are you sure that you’re using foobar_path(1), not foobars_path(1) (singular form)

    in real life foobars_path(1) will return /foobars.1 and foobar_path(1) – /foobar/1

    as I see you have to use brain_path(1) not brain_path(1)

    UPD

    Change your route.rb

    map.resources :brain
    

    it will be better if you’ll rename your controller into pluralize brains – it is more conventional when you are using resources

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

Sidebar

Related Questions

I have a strange problem. I have this method, which should generate a Date
So I have this code for changing the image on my UIImage view. And
I have this strange behavior in my JSP page: I have two Integer variables
I have realy strange behavior. I have this code (I remove unrelated code). $(function()
I have this strange problem. I am retrieving twitters and it works on the
I have this strange error, When I call $element_attrs = $element -> attributes(); I
i have this strange problem with the PHP function CTYPE_ALNUM if i do: PHP:
Can anyone tell me why I always have this strange output after running this
Starting from Android 3.2 I have this strange problem. It's very easy to reproduce:
So i have this rather strange issue, i am trying to line up some

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.