Sha256: 9ec18bf12e04665d79a7cd2e8cd99b037acd7109d0b180bcfc6d39941bc8506a
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
= MagickColumns This gem extends ActiveRecord to provide queries built from *simple* strings == Instalation Add to your Gemfile: gem 'magick_columns' == Usage When must declare `has_magick_columns` in your model: class Person < ActiveRecord::Base has_magick_columns name: :string, email: :email, birth: :date end And now you can do something like this: people = Person.magick_search('anakin or luke') The method returns a Relation, so you can apply any aditional method you want: people.order('name').limit(5) And of course you can "spy" the query with: people.to_sql == How to contribute If you find what you might think is a bug: 1. Check the GitHub issue tracker to see if anyone else has had the same issue. https://github.com/francocatena/magick_columns/issues/ 2. If you do not see anything, create an issue with information on how to reproduce it. If you want to contribute an enhancement or a fix: 1. Fork the project on GitHub. https://github.com/francocatena/magick_columns/ 2. Make your changes with tests. 3. Commit the changes without making changes to the Rakefile, VERSION, or any other files that are not related to your enhancement or fix 4. Send a pull request.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
magick_columns-0.0.1 | README.rdoc |