{"repo":"freeletics/array_enum","free":true,"listed":false,"github":"https://github.com/freeletics/array_enum","clone":"git clone https://github.com/freeletics/array_enum.git","description":"String to integer mapping for PostgreSQL array columns","language":"Ruby","stars":53,"topics":["rails","activerecord","postgresql","enum"],"license":"MIT","category":"databases-storage","readme_excerpt":"ArrayEnum Extension for ActiveRecord that adds support for PostgreSQL array columns, mapping string values to integers. Installation gem install array enum or use Gemfile with bundler Usage ActiveRecord extension Database will store integers that after reading will map to string values. Several scopes are made available on your model to find records based on a value or an array of values: Attempting to find a record with a value that is not in the enum will fail: Subset Validator Additionally subset validator is provided that can help to ensure correct values are passed during validation. Development After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run bundle exec rake install . To release a new version, update the version number in version.rb , and then run bundle exec rake release , which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org. Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/freeletics/array enum. License The gem is available as open source under the terms of the MIT License.","default_branch":null,"files":null,"tree":[],"storefront":"/r/freeletics","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/freeletics/array_enum/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}