Tell us what is the purpose of the resources method in the code snippet below?
Submitted by: Muhammadresources :posts do
member do
get ‘messages'
end
collection do
post ‘bulk_upload'
end
end
Defining routes with the “resources” method automatically generates routes for the seven standard RESTful actions:
☛ GET /messages
☛ POST /messages
☛ GET /messages/new
☛ GET /messages/:id/edit
☛ GET /messages/:id
☛ PATCH/PUT /messages/:id
☛ DELETE /messages/:id
Submitted by: Muhammad
member do
get ‘messages'
end
collection do
post ‘bulk_upload'
end
end
Defining routes with the “resources” method automatically generates routes for the seven standard RESTful actions:
☛ GET /messages
☛ POST /messages
☛ GET /messages/new
☛ GET /messages/:id/edit
☛ GET /messages/:id
☛ PATCH/PUT /messages/:id
☛ DELETE /messages/:id
Submitted by: Muhammad
Read Online Ruby on Rails Developer Job Interview Questions And Answers
Top Ruby on Rails Developer Questions
☺ | What is RVM? |
☺ | What is Rails Scaffolding? |
☺ | Explain me what Are The Components Defined In The Model From Mvc Architecture? |
☺ | Please explain request/response cycle? |
☺ | Explain what’s different between ActiveRecord::Relation’s count, length and size methods? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |