The project is in a healthy, maintained state
Add ULID support to ActiveRecord
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Activerecord::Ulid

Installation

Add this gem to your Gemfile:

gem 'activerecord-ulid'

Then, run bundle install.

Usage

in your model:

class User < ActiveRecord::Base
  attribute :id, :ulid
end

you can add a prefix to the ulid:

class User < ActiveRecord::Base
  attribute :id, :ulid, prefix: 'usr_'
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/seuros/activerecord-ulid.

License

The gem is available as open source under the terms of the MIT License.