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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:28:07+00:00 2026-05-20T19:28:07+00:00

sorry if this is a dumb Q, this is my first Rails3 project… For

  • 0

sorry if this is a dumb Q, this is my first Rails3 project…

For some reason, this <%= link_to 'edit', edit_geofence_path(geofence) %>

renders as <a href="/geofence/edit.2">edit</a> (my geofence’s id is 2).

And <%= link_to 'delete', {:action=>'destroy', :id=>geofence}, :confirm=>"You sure?", :method=> :delete %>

renders as <a href="/geofence?id=2" data-confirm="You sure?" data-method="delete" rel="nofollow">delete</a>,

which might be fine, but clicking the link generates this in the logs Started GET "/geofence?id=2". So, not DELETE, just GET.

My routes.rb file is just resource :geofence.

On a related note, for some reason the default action for a geofence is “show”. So /geofence/ DOES NOT call the index method, it calls the show method. I think that also must be wrong.

I’m done cursing at this app for now, I’m going to take a day to cool off and hopefully get this SIMPLE SCAFFOLD working tomorrow night… Help me, stackoverflow! You’re my only hope!

  • 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-20T19:28:08+00:00Added an answer on May 20, 2026 at 7:28 pm
    <%= link_to 'delete', {:action=>'destroy', :id=>geofence}, :confirm=>"You sure?", :method=> :delete %>
    

    should be:

    <%= link_to 'delete', {:action=>'destroy', :id=>geofence}, :confirm=>"You sure?", :method=> :delete, :remote => true %>
    

    Without :remote => true, the click isn’t handled by javascript.

    And in your routes.rb file, you should have that defined as:

    resources :geofence
    

    Setting it as resource implies that there is only one, and is causing a lot of your weird behavior.

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

Sidebar

Related Questions

first of all, I'm just a hobbyist, so I'm sorry if this is dumb
Sorry if this is dumb but I was just thinking I should give a
sorry for asking this dumb question i will try to explain as good as
Sorry if this is a dumb question but im creating a filter class that
Sorry if this is a dumb question. I'm using .each to loop through a
Sorry if this is a dumb question, but it is possible to store, and
I am just starting out C++, so sorry if this is a dumb question.
Sorry if my question seems dumb. I've started using Eclipse Ganymede 3.4 this week
First of all sorry of asking such a dumb question, I am quite a
Must be really dumb today - sorry in advance; anyhow have this unordered list

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.