Adding text search to a Rails generated scaffolding - ScaffSearch


Any database table usually requires a lot of text searching. Rails scaffold is a great way to quickly create new tables, models with appropriate forms with one command line. This rails plugin will add a search box to the table of the model created in the scaffolding.


Introduction


ScaffSearch is a rails generator that is an add-on to the rails scaffolding generator. This generator adds text searching functionality to a scaffold. The scaffolding of a model usually generates a view (views/[scaffoldName]/index.html.erb) that displays the rows of the model in the form of an HTML table.

While this page is an excellent view for an administrator to see the contents of a database table, it does not offer any option to perform search on the table. Searching comes in handy, for example, if the administrator wants to manually check for the presence of a record in a table, he/she can just search for that record and find its presence in the table.


Installation


You need to have Ruby on Rails installed in your system to install this generator. (Duh!)

Rohan Raja

Recently graduated, majoring in Mathematics and Computing from IIT Kharagpur, Rohan is a technology enthusiast and passionate programmer. Likes to apply Mathematics and Artificial Intelligence to devise creative solutions to common problems.