https://github.com/singhsatyam/column_like
Use like query in rails
https://github.com/singhsatyam/column_like
activerecord ruby ruby-gem ruby-on-rails rubygem rubygems
Last synced: 6 months ago
JSON representation
Use like query in rails
- Host: GitHub
- URL: https://github.com/singhsatyam/column_like
- Owner: SinghSatyam
- License: mit
- Created: 2015-05-03T16:42:57.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-04T10:25:55.000Z (over 10 years ago)
- Last Synced: 2025-01-22T06:04:04.648Z (over 1 year ago)
- Topics: activerecord, ruby, ruby-gem, ruby-on-rails, rubygem, rubygems
- Language: Ruby
- Homepage: https://rubygems.org/gems/column_like
- Size: 445 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Column Like allows you to search using like query in ActiveRecord. It is:
* LightWeight
* Customizable
* Available with every model
## Getting started
Column Like works with ActiveRecord 3.0 onwards. You can add it to your Gemfile with:
```ruby
gem 'column_like'
```
Run the ```bundle``` command to install it.
After you install Column Like and add it to your Gemfile, you need to run the generator:
```console
rails generate column_like:install
```
You should restart your application after installing Column Like.
## Usage
```ruby
User.first_name_like('satyam')
User.last_name_like('satyam')
User.email_like('satyam')
User.first_name_like('saty%')
User.first_name_like('s_ty%')
User.first_name_like('%ty%')
User.first_name_like('%ty__')
```
## Bug reports
If you discover a problem with Column Like, I would like to know about it. Send an email to satyam.mgs@gmail.com
## Contribute
1. Fork it ( http://github.com/SinghSatyam/column_like/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request