Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Gem for Rails 3, that helps validate overlap
Ruby JavaScript
Branch: master
Pull request Compare This branch is 3 commits ahead, 82 commits behind robinbortlik:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
MIT-LICENSE
README.rdoc
Rakefile
VERSION
validates_overlap.gemspec

README.rdoc

ValidatesOverlap

This project rocks and uses MIT-LICENSE.

This gem is available only for Rails 3.

When this gem should be helpful for you?

If you are developing Rails 3 app, let say some meeting planner and you can't save records which have time overlap.

Using

Add to your gemfile

gem 'validates_overlap'

In your model

without scope

validates :starts_at, :ends_at, :overlap => true

with scope

validates :starts_at, :ends_at, :overlap => {:scope => "user_id"}
Something went wrong with that request. Please try again.