Skip to content
Simple rails plugin to make sure a value is divisible by a number of your choosing.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
tasks
test
MIT-LICENSE
README
Rakefile
init.rb
install.rb
uninstall.rb

README

ValidatesDivisible
==================

Simple Active Record extension to validate the divisibility of a column.


Example
=======

class Example < ActiveRecord::Base
  validates_divisible :amount, :by=>15, :message=>'must be divisible by 15.'
end

Example.new(:amount => 15).valid? #=> true
Example.new(:amount => 16).valid? #=> false


Copyright (c) 2008 Jake Howerton, released under the MIT license
Something went wrong with that request. Please try again.