Skip to content
citext support for rails 4
Ruby
Branch: master
Clone or download
Latest commit 3b72505 Jun 15, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/activerecord/postgresql extracted as gem Sep 30, 2013
spec
.gitignore extracted as gem Sep 30, 2013
.rspec
.ruby-gemset extracted as gem Sep 30, 2013
.ruby-version extracted as gem Sep 30, 2013
Gemfile extracted as gem Sep 30, 2013
LICENSE.txt extracted as gem Sep 30, 2013
README.md Correct gem name Apr 18, 2014
Rakefile extracted as gem Sep 30, 2013
activerecord-postgresql-citext.gemspec bump version to 0.2.0 Jun 15, 2015

README.md

ActiveRecord support for citext

Adds support for citext to active_record

Installation

Add this line to your application's Gemfile:

gem 'activerecord-postgresql-citext'

And then execute:

$ bundle

Or install it yourself as:

$ gem install activerecord-postgresql-citext

Usage

In a database migration you need to first enable citext as an extension, then you can create columns of type citext.

def up
  enable_extension("citext")                   
                                             
  create_table :models, :force => true do |t|  
    t.citext :name                             
    t.timestamps                               
  end                                          
end

Contributing

  1. Fork it
  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
You can’t perform that action at this time.