-
Notifications
You must be signed in to change notification settings - Fork 0
Model Usage
bellmyer edited this page Sep 13, 2010
·
3 revisions
- Home – Summary and Installation instructions
- Model Usage – How to include blacklist validation in your model
- Blacklist Syntax – How to setup your blacklist yaml files, with the various options
- Programmatic Changes – Changing your blacklists programmatically
# app/models/user.rb
class User < ActiveRecord::Base
validates_blacklist :message => 'is not a valid value'
end
# app/models/user.rb
class User < ActiveRecord::Base
validates_blacklist :attributes => {:name => 'is not a valid name'}
end