19/11/2016
Published my first Gem which adds searching functionality to active record modelsmake_model_searchable adds simple searching functionality to active record models. No need to implement same search function for each model every time! What is does? Provides modular solution to add search functionality for selected fields. It let’s you specify which fields you want to make searchable adding searchable_attributes in model. If no field is specified, all attributes are searched. What’s next? There are many improvements to be made, such as adding support for allowing to search joined associations, ability to search from numeric and date fields, and few more. Working on this project has been awesome experience and it helped me to learn few concepts related to ruby meta-programming and Arel. Both are very interesting and broad concepts, and makes ruby much more powerful language. I am working on improvements and would like your support to make it more better! Here is the link to repo: https://github.com/8parth/make_model_searchable UPDATE: This gem now supports searching from joined tables. Checkout v2.0.1 for this update. Checkout my other articles: Thanks for reading!
|
AuthorHi, I am Parth Modi. I am software developer. I like to work in Ruby on Rails and Java. Archives
October 2016
CategoriesAll Aws-tutorials Git Github Pages Json Linux Rails API Ruby Ruby On Rails Tutorials |