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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:54:25+00:00 2026-05-11T02:54:25+00:00

How would you integrate things like this in a RESTful design? Marking an email

  • 0

How would you integrate things like this in a RESTful design?

  • Marking an email as read
  • Voting on a story
  • Reporting a message as inappropriate

Additionally, how would you do it in such a way that one could make a small icon link or button to do the action without too much wizardry?

  • 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-11T02:54:26+00:00Added an answer on May 11, 2026 at 2:54 am

    That depends on what you’re doing. Sometimes all it takes is shifting your viewpoint from ‘performing an action on a resource’ to ‘creating another, different, but related resource.’

    Voting on a story is easy: a Vote resource that you can create, review, etc. Same thing with a Report. This can be applied to anything, instead of marking an Order as submitted, it instead would have a Submission, etc. The key is to figure out how to transfigure your verb into a noun.

    Marking an email as read is a bit different. What I would do for that is to use a virtual attribute: creating your own setter methods on your model (mark_as_read=, for instance) will let you pass mark_as_read through the params array in an #Update action.

    To take the example of voting on a story. What you would do is create a Vote model, which belongs to a Story. Create a Votes controller, and have it nested off the Stories controller in your routes file. then, you can use your nested resource routes (passing in your Story record) to easily create votes scoped to the individual story.

    Note that the resource doesn’t necessarily have to be backed by a database model, although it would be proper form. You could always simply modify the Story record, in this case, while maintaining the RESTfulness and the ability to easily expand to a full model if needed.

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

Sidebar

Related Questions

I would like to integrate an existing application someone has on github into my
Is there any framework that would allow me to integrate paypal with twitter, such
Would having a nice little feature that makes it quicker to write code like
I would like to confirm that the following analysis is correct: I am building
I'd like to integrate Propel with Zend framework . I've seen the integration of
I have a stl set of integers and I would like to iterate through
I would like to update my SQL lite database with the native update-method of
I would like to get a sum from a column, with and without a
I would like to remove/delete a migration file. How would I go about doing
(please excuse that I didn't use aliases). I would like my query output to

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.