An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Column Like
Gem Version
Security Feature
Code Complete
Code Coverage
Dependency Status

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