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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:33:06+00:00 2026-05-11T15:33:06+00:00

After I generate a scaffold, Rails gives me the ability to POST to items.xml

  • 0

After I generate a scaffold, Rails gives me the ability to POST to items.xml which will create a new item. A GET to items.xml will simply list them all. Where does Rails specify which method in the controller (create or index, respectively) will be called, based on the type of action I am performing?

More specifically, POST calls methodA but GET to the same URL calls methodB. Where is this specified? Where does Rails make the determination to call the index method of the controller?

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

    I believe it’s specified by REST. Here’s a list for ya:

    GET    /items        #=> index GET    /items/1      #=> show GET    /items/new    #=> new GET    /items/1/edit #=> edit PUT    /items/1      #=> update POST   /items        #=> create DELETE /items/1      #=> destroy 

    Edited to add to get all those routes, in config/routes.rb, simply add map.resources :items

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

Sidebar

Related Questions

After generate rspec:install in a Rails 3 project any new scaffolding will include some
I'm following this tutorial (seems good) for Rails. After I run ruby script/generate scaffold
After making a new rails 3.2.3 application, I generated a new scaffold to play
I dynamically generate png files which after clicking generate button appears under link. generate
I want to get the generate-id(.) of all the text nodes after node <m/>
In my application I sometimes generate a new picture. After reading comments here I
After some work with PHPExcel, I finally get it to generate sheets of 3000cells
What did I do: create a new ruby app rails new campaigns_manager move to
After script/generate authenticated user sessions users_controller.rb is created with def new @user = User.new
After creating a migration file with rails generate migration AddClientToUser I can edit my

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.