This is a little showcase to show how a search with arbitrary product groups and categories is possible.
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ │ │ │ │ │
│ Category ├──────────► │ CriteriaGroup ├───────► │ Criteria │
│ │ has_many ve│ │ has_many │ │
└──────────────────┘ └──────────────────┘ └───┬────────────┬─┘
│ can have │
▼ ▼
┌─────────┐ ┌────────┐
│numeric │ │fixed │
│values │ │text │
│ │ │values │
│ │ │ │
└─────────┘ └────────┘
▲ ▲
│ │
┌──────────────────┐ │ │
│ │ │ │
│ Company ├────────────────┴──────────┘
│ │ defines matching values
└──────────────────┘
Features:
- Search with categories from the database
- I18n
The demo uses following tools
Most of it can be installed via the following command after installing ruby:
bundle
Run the following commands to create and setup the database.
bundle exec rake db:create
bundle exec rake db:setup
You can start the rails server using the command given below.
bundle exec rails s
The default url is http://localhost:3000 in development mode(default)