public
Description: Rails app using the searchlogic library
Homepage: http://searchlogic_example.binarylogic.com
Clone URL: git://github.com/binarylogic/searchlogic_example.git
Click here to lend your support to: searchlogic_example and make a donation at www.pledgie.com !
binarylogic (author)
Sun Nov 30 11:43:43 -0800 2008
commit  0b8f053c4098ec2a6ba570991d7bb91c0dd8ae42
tree    f3fff88fd20370563bc8e7e14ea4c7fe3be46894
parent  68b13aab18bbb8a9a38dd6f6e67e4f769cf45135
name age message
file .gitignore Loading commit data...
file Capfile
file MIT-LICENSE
file README.rdoc
file Rakefile
directory app/
directory config/
directory db/
directory doc/ Fri Sep 05 15:59:35 -0700 2008 Initial commit [binarylogic]
directory lib/
directory public/
directory script/ Fri Sep 05 15:59:35 -0700 2008 Initial commit [binarylogic]
directory test/ Sat Sep 06 18:49:49 -0700 2008 Completed example [binarylogic]
directory vendor/
README.rdoc

Searchlogic Example

This is an example of how to use Searchlogic in a rails app. Searchlogic is simple searching, ordering, and pagination all in one plugin.

This application live: searchlogic_example.binarylogic.com

Quick tutorial on how to build this application here: www.binarylogic.com/2008/9/7/tutorial-pagination-ordering-and-searching-with-searchlogic

Searchlogic: github.com/binarylogic/searchlogic

Key files

Here are the files you want to glance at:

  1. All of the controllers and their respective views
  2. config/initializers/searchlogic.rb

Generate Test Data

First you need to install the Populator and Faker gems. You can do this by either using rails’ gems task

rake gems:install

or by installing the gems manually

sudo gem install populator

sudo gem install faker

After you have set up the gems and migrated your database you can generate the data:

rake db:populate

The populate task will create 8 user groups with 0 to 150 users each. Each user can have upto 7 orders. (see lib/tasks/populate.rb)

Copyright © 2008 Ben Johnson of Binary Logic, released under the MIT license