Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.
This project is archived and is in readonly mode.
This patch creates a range validator for active model. In the simplest case, it validates that a field is a range, e.g.
validates :field, :range => true
It is also capable of validating that the range does or does not overlap with other ranges in other models, e.g.
validates :field, :range => { :not_overlapping => Proc.new{ |record| record.other_records } } validates :field, :range => { :overlapping => :other_records }
I provided some more examples of usage on the github page where I maintain this code as a gem: https://github.com/chrisb87/range_validator
Reported by Chris Baker · February 25th, 2011 @ 12:45 AM
No comments yet.