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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:31:35+00:00 2026-06-16T15:31:35+00:00

My Rails app has a User model and an Idea model. Each user can

  • 0

My Rails app has a User model and an Idea model. Each user can have many ideas, and each idea belongs to one user (or none). Users take ownership of an idea using the Idea controller’s claim action, and release ideas using the release action.

So far, really simple. But I’ve just realized I want this to do a bit more, and now I’m not sure how to proceed: Basically, I want users to be able to “report” ideas for being bad/invalid ideas, along with a note specifying the reason for the report.

I would also like to keep track of metrics regarding to claiming ideas — how long an idea was claimed for before being marked as submitted (it’s for managing blog posts), and so on.

In an unrelated question, someone suggested I need a Claim model in my app for this sort of complex tracking. This makes sense to me, but I’m really not sure how that model would be structured, and how it would work. Would it be like a log? If so, how would I figure out what’s the current idea status for each idea?

Any insights on this would be most welcome.

  • 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-06-16T15:31:36+00:00Added an answer on June 16, 2026 at 3:31 pm

    I think, since you need a log of all user actions its better if you keep Reports and Claims independent.

    So, it might look along the lines of

    User has_many Ideas

    Idea has_many Claims

    Idea has_many Reports

    Code:

    class User < ActiveRecord::Base
      attr_accessible :name
      has_many :idea
    end
    
    
    class Idea < ActiveRecord::Base
      attr_accessible :desc, :title
      belongs_to :user
      has_many :claim
      has_many :report
    end
    
    
    class Claim < ActiveRecord::Base
      attr_accessible :status
      belongs_to :idea
    end
    
    class Report < ActiveRecord::Base
      attr_accessible :reason
      belongs_to :idea
    end
    

    And since, rails migration would add columns for time-stamps. you would be able to calculate the time differences between change of status etc.

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

Sidebar

Related Questions

I have a model User and Listing in my rails app. User has many
In my rails app Users and Schools can create courses, and each course has
I'm writing a rails app that has a model called 'User' and a model
I have a rails app (rails 3.1.3) that has a shopping cart model. I
I have a Rails 2.3.x app that implements the act_as_authentic in User model and
My Rails 3 app has a User model and a Profile model. A User
Basically, I have a users model in my rails app, and a fanship model,
My app has a User model, and a Game model. I want each user
I have a Rails app with users, suggestions and searches. There is a many-to-many
I have a rails app which currently has 3 models: Post , User and

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.