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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:58:31+00:00 2026-05-10T20:58:31+00:00

I would like to make my application somewhat REST compliant. I am using Rails

  • 0

I would like to make my application somewhat REST compliant. I am using Rails on the backend and GWT on the frontend. I would like to do updates and deletes. I realize I can do something like mydomain.com/:id/delete (GET) and accomplish the same thing. However, as I stated previously, I would like to have a REST compliant backend. Thus, I want to do mydomain.com/:id (DELETE) and have it implicitly call my delete method.

Now, it’s my understanding that if a browser (my browser is GWT RequestBuilder) doesn’t support DELETE/GET, Rails somehow accomplishes this task with a POST and some other url parameter. So, how can I accomplish this with a GWT RequestBuilder?

  • 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. 2026-05-10T20:58:32+00:00Added an answer on May 10, 2026 at 8:58 pm

    Rails does this with hidden attributes. The easiest way to figure this out would be to create a new rails application, generate a scaffold and have a look at the HTML in a browser.

    Try this:

    rails jp cd jp ./script/generate scaffold RequestBuilder name:string rake db:migrate ./script/server  

    Then navigate to http://localhost:3000/request_builders, click on New and have a look at the HTML. You’ll see something like:

    <form action='/request_builders' class='new_request_builder'    id='new_request_builder' method='post'>   <div style='margin:0;padding:0'>     <input name='authenticity_token' type='hidden' value='e76...' />   </div> 

    This is a creation, method is POST. Enter a name, save then Edit:

    <form action='/request_builders/1' class='edit_request_builder'    id='edit_request_builder_1' method='post'>   <div style='margin:0;padding:0'>     <input name='_method' type='hidden' value='put' />     <input name='authenticity_token' type='hidden' value='e76...' />   </div> 

    Of course the form is sent with POST, but Rails hads a hidden field to simulate a PUT request. Same for deletion, but the scaffold will do it with a bit of Javascript:

    var m = document.createElement('input');  m.setAttribute('type', 'hidden');  m.setAttribute('name', '_method');  m.setAttribute('value', 'delete'); 

    To have this work with another front-end, you’ll have to both:

    • Use the same style URL such as /request_builders/1 (RESTful URLs)
    • Include the hidden fields (Rails trick)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Ruby on Rails and I would like to make HTTP requests
I would like to make the update of the web application as automated as
I would like to make my Java/Swing application compatible with the Services-menu available on
I would like to make a simple desktop application to learn this kind of
I have a Java application and I would like to make it extensible. To
We're developing a windows mobile 6.1 application and would like to make the user
I would like to make an application in which, when I press a button,
I would like to make my WPF application fullscreen. Right now the start menu
I would like to make a web application (PHP) that will have overlay container
I would like to make a C# application that displays a message when the

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.