0.0
No commit activity in last 3 years
No release in over 3 years
Adds an "is_a" validator to validate polymorphic relations.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.3
~> 2.1
~> 13.0
~> 3.9
~> 0.93

Runtime

 Project Readme

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.