https://github.com/braintree/activerecord-postgresql-citext
citext support for rails 4
https://github.com/braintree/activerecord-postgresql-citext
Last synced: about 1 year ago
JSON representation
citext support for rails 4
- Host: GitHub
- URL: https://github.com/braintree/activerecord-postgresql-citext
- Owner: braintree
- License: mit
- Created: 2013-09-30T16:04:29.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2019-01-01T13:14:15.000Z (over 7 years ago)
- Last Synced: 2025-06-14T15:02:30.655Z (about 1 year ago)
- Language: Ruby
- Size: 152 KB
- Stars: 14
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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.
```ruby
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