[![Build Status](https://travis-ci.org/jetrockets/metka.svg?branch=master)](https://travis-ci.org/jetrockets/metka) [![Open Source Helpers](https://www.codetriage.com/jetrockets/metka/badges/users.svg)](https://www.codetriage.com/jetrockets/metka) # Metka Rails gem to manage tags with PostgreSQL array columns. ## Installation Add this line to your application's Gemfile: ```ruby gem 'metka' ``` And then execute: $ bundle Or install it yourself as: $ gem install metka ## Tag objects ```ruby class Post < ActiveRecord::Base include Metka::Model end @post = Post.new(title: 'Migrate tags in Rails to PostgreSQL') @post.tags = ['ruby', 'postgres', 'rails'] @post.save ``` ## Find tagged objects ```ruby Post.tagged_with('ruby') => [# nil ``` In example above you will get records that are tagged with `ruby` and `crystal`. To get records that are tagged with any of these tags use `any` option. ```ruby Post.tagged_with('ruby, crystal', any: true) => [#