IsAValidator
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
Usage:
belongs_to :account, polymorphic: true
validates :account, is_a: Account
Development & Testing
Ruby version is managed by rvm
& .rvmrc
gem install bundler
bundle install
bundle exec appraisal install
bundle exec appraisal rspec
Generating Docs
bundle exec rdoc
Tagging & Deploying a new version
# 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
License
IsAValidator is released under an MIT-LICENSE. Use it how you see fit.