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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:13:38+00:00 2026-05-13T14:13:38+00:00

I have an action that doesn’t require a form. So it really only needs

  • 0

I have an action that doesn’t require a form. So it really only needs the one ‘edit’ method instead of the RESTful ‘edit’ –> ‘update’. Is there any reason not to do this or a better way?

def edit
  #Do a POST(PUT)
end
  • 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-13T14:13:39+00:00Added an answer on May 13, 2026 at 2:13 pm

    The harm is that a user could easily navigate to that url and perform a potentially destructive action.

    /noform/edit   #URL typed by user => Action Performed
    /noform/update #URL typed by user => Error is thrown, No Action Performed
    

    A normal browsing experience generates GET requests to the server. The assumption is, any page you can easily navigate to (or type into your address bar) will not perform any data changing functions.

    A POST request, generated via a form submission or a AJAX request expects the result that data is changed on the server.

    Similarly the two rails “faked” versions of PUT and DELETE also are not actions you could simply navigate to using a browser.

    The solution

    The solution is to have only the update action and where you originally would have linked to edit use something like the following:

    button_to "Add new tracker", noform_path, :method => :put
    

    If there is any type of error, you may still need an edit path to show the user so they can correct something. But from what you have described, a single update action should do the trick.

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

Sidebar

Ask A Question

Stats

  • Questions 308k
  • Answers 308k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer .parent{ display:block; position:relative; } .child{ position:absolute; right:-100px; width:100px; } <div… May 13, 2026 at 9:39 pm
  • Editorial Team
    Editorial Team added an answer // Update based on comment The cache is unique per… May 13, 2026 at 9:39 pm
  • Editorial Team
    Editorial Team added an answer Correct - you don't understand covariance correctly - yet :)… May 13, 2026 at 9:39 pm

Related Questions

I have an action in which I want to intercept any possible integer id
I have an action that is calling a private method. If an error occurs
I have a Java Web application that has several servlets with the following mappings.
How can I render after executing an action in a restful controller instead of
I have a BaseController in which I put in some data in the ViewData

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.