Provides an ActiveRecord validator that ensures a polymorphic association
- is an instance of specific class or one of its subclasses or
- implements a specific Concern
belongs_to :account, polymorphic: true
validates :account, is_a: Account
Ruby version is managed by rvm
& .rvmrc
gem install bundler
bundle install
bundle exec appraisal install
bundle exec appraisal rspec
bundle exec rdoc
# Update lib/is_a_validator/version.rb
gem build is_a_validator.gemspec
git tag -a vX.X -m "Releasing vX.X"
git push origin vX.X
IsAValidator is released under an MIT-LICENSE. Use it how you see fit.