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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:13:15+00:00 2026-05-12T06:13:15+00:00

I am creating a system where a user can select any combination of four

  • 0

I am creating a system where a user can select any combination of four options.

Then results are displayed based on their exact combination.

For example, if a user chose color, text, and logo. Only results featuring color, text, and logo would return.

On the other side, I am creating “templates” that will eventually be the results returned. Each template will be earmarked to be able to return properly when a user selects a combination that corresponds with the template.

My Question :

What is the best way to categorize this information in the back-end so it can be pulled by the user requests?

For example, I have a template that can be color and text OR color, text, and logo. My guess is two group these two in a family, and then when a combination is made, a query reviews each family for a matching combo; if true, that specific combo variation is returned.

Would you do it any differently?

Thanks!

  • 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-12T06:13:15+00:00Added an answer on May 12, 2026 at 6:13 am

    You shoudn’t hardcode the number of available categories (what if tomorrow you need another category?)

    Combination
      has_many :categories
      belongs_to :template
    
      def self.find_by_selected_categories(array_of_categories)
        self.find(:first, :conditions => {:categories => array_of_categories})
      end
    end
    
    Template
      has_many: combinations
    end
    

    …

    The downside of this approach is that you must have a correspondence table (categories-combinations).

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

Sidebar

Related Questions

I'm creating a content management system where a user can select a css file
I'm interested in creating a system where the user can define the steps in
I'm printing a document by creating a System.Diagnostics.Process object and then setting the StartInfo
I'm creating a user system for Rails, and login, sign up etc... all works.
I am creating a system where users can setup mailings to go out at
So I am trying to setup an entry posting system, where the user can
I am creating a simple form based message display system, each message is a
I'm trying to create a system in Python in which one can select a
I am creating a booking system for some student cabins. The user control needs
I'm creating a notification system that instantly checks to see if there are any

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.