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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:25:27+00:00 2026-05-29T10:25:27+00:00

I’m using Rails 3.2 (not a ruby on rails question) and coming close to

  • 0

I’m using Rails 3.2 (not a ruby on rails question) and coming close to the end of a project I’ve been working on. Right now I’m building a user private messaging feature.

I’ve been following http://www.novawave.net/public/rails_messaging_tutorial.html#start but some things don’t make any sense, some things don’t work.. most likely because that version of ROR is outdated.

I now intend to do this myself now but need some help to get started. I’m going in circles having trouble trying to figure out the best way to implement this.

I do already have something similar.. “wall posting” where several users can comment on 1 wall post in thread like fashion. With this though if the original wall post is deleted then all the comments are too.

With my messaging system I’d like it simple with just Inbox. A user will see messages they have sent and received ordered by sent_at date. I want users to have the ability to delete their messages with out the others being deleted.

What I’m thinking

-I’m thinking a way to achieve this is have 2 copies of messages.

-1 for User A(sender) and 1 for User B(recipient) this way they can indepenently manage messages with out affecting the other user.

So far I have thought about having 3 tables:

  1. Messages

  2. Message_copies

  3. Folders (this will store a row for each user which is created at signup automatically then when ever they receive a message they’ll be ….. acts_as_tree… ?? …. erm… blue stars?? ….. back ache.. (my mind starts wandering)..

and this is where my head starts to hurt. I feel like I have no idea what I’m trying to do even though I do. When I feel like yes I think I’ve got this now I meet a brick wall.

Solution

I was hoping if anyone who has implemented such a feature would be able to provide me info for the tables in a database I need to achieve what I intend to achieve. I 100% know I can do it but just need a kick start. This has been the biggest obstacle since I started this project.

I can’t seem to get my head round this and trying to avoid having the same message stored twice.. once for sender and once for recipient. That way just doesn’t seem right.

I feel it would be best to have 1 table where all messages are stored then maybe a folder table for each user created automatically on signup and from his folder table the messages stored in the message table are used by sender and recipient and wen a user actually deletes a message from their folder it will still remain in the message table until the other user sender/recipient also deletes the message from their folder.

Kind regards

  • 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-29T10:25:28+00:00Added an answer on May 29, 2026 at 10:25 am

    How about one table for messages and one table for message recipients? In the recip table you could have a column for “what to do with this message” and options for “keep, replied, delete(don’t show), delete(show)”, etc. Then you can join to this to get whether or not a given recip cares about what happens with this message.

    Making multiple copies of a message seems like overkill.

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.