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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:55:34+00:00 2026-05-13T08:55:34+00:00

I am building a project management app and need some help with how to

  • 0

I am building a project management app and need some help with how to pass a parameter (I think that is how you say it). Here is what I have going on.

I have a table called “proposals” and “proposals” allow you to create multiple concepts per proposal. I have a table called “concepts” and on each “concept” the user can “comment”. The way that I have set this up is to generate a table called concept_comments.

Currently the comments are only associated with the concepts but I would like to display all the comment, across all the concepts, for that particular proposal. I am guessing that his has to do with two things:

  1. including another line to collect proposal_id when creating a comment.
  2. Assigning a has_many :concept_comments to the model/proposal.rb file.
  3. Adding map.resources :proposals, :has_many => :concept_comments.

Not sure if that is correct but that is in my head. Only thing I have done so far is to create a column in my concept_comments table called proposal_id. Here is my concept_comments_controller.rb code for ‘create’:

  def create
    @concept = Concept.find(params[:concept_id])
    @concept_comment = @concept.concept_comments.create!(params[:concept_comment])
    respond_to do |format|
      format.html { redirect_to @concept }
      format.js
    end
  end

Not quite sure how to tell it to also collect the proposal_id. Somehow I need to tell it to look at the concept_id that has been passed in, then pull the proposal_id number from the concept table, and pass that to the proposal_id in the concept_comments table.

My thinking is that I can then call on the concept_comments table for all entries that have the proposal_id.

I am not even sure if that makes any sense.

  • 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-13T08:55:34+00:00Added an answer on May 13, 2026 at 8:55 am

    well – you could pass in the proposal id, but, if you already have a concept_comment id, you don’t need a proposal id

    @proposal_comments = ConceptComment.all(:joins => :concept, 
                                            :conditions => ["concepts.proposal_id = ?", 
                                            @concept_comment.concept.proposal_id])
    

    Where @concept_comment is on a member action of the comments controller – for collection actions, you will need to pass in a proposal id and substitute that in for @concept_comment.concept.proposal_id

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

Sidebar

Related Questions

Right now I'm building a project management app in rails, here is some background
Right now I'm building a project management app in rails, here is some background
I have a C# project building winexe that startup without console window. However, I
I am building a project management app and I am not sure which is
I'm building some web apps for clients. They're usually CRMs, project management systems, custom
I'm building a project that uses the JVCL plugin system, which relies on runtime
I'm currently building a project and I would like to make use of some
Building the same project (without any changes) produces binary different exe-files: some small regions
Right now, I'm in the middle of actually building a Project Management application, and
Is there any particular reason that the linking phase when building a project with

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.