Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
2  lib/validates_overlap/overlap_validator.rb
@@ -21,7 +21,7 @@ def find_crossed(record)
self.generate_overlap_sql_values(record)
self.add_attributes(record, options[:scope]) if options && !(scope = options[:scope]).blank?
- return record.class.exists?([sql_conditions, sql_values])
+ return options[:class].present? ? options[:class].constantize.exists?([sql_conditions, sql_values]) : record.class.exists?([sql_conditions, sql_values])
end
View
15 validates_overlap.gemspec
@@ -110,15 +110,14 @@ Gem::Specification.new do |s|
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
- s.add_runtime_dependency(%q<sqlite3>, [">= 0"])
- s.add_runtime_dependency(%q<rspec-rails>, [">= 2.0.0.beta"])
- s.add_runtime_dependency(%q<factory_girl_rails>, [">= 0"])
- s.add_runtime_dependency(%q<bundler>, ["~> 1.0.0"])
- s.add_runtime_dependency(%q<jeweler>, ["~> 1.5.2"])
- s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
- s.add_development_dependency(%q<rspec-rails>, [">= 0"])
+ s.add_runtime_dependency(%q<activemodel>, [">= 3.0.0"])
+ s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
+ s.add_development_dependency(%q<rails>, [">= 3.0.0"])
+ s.add_development_dependency(%q<sqlite3>, [">= 0"])
+ s.add_development_dependency(%q<rspec-rails>, [">= 2.0.0.beta"])
s.add_development_dependency(%q<factory_girl_rails>, [">= 0"])
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
else
s.add_dependency(%q<rails>, [">= 3.0.0"])
s.add_dependency(%q<sqlite3>, [">= 0"])

No commit comments for this range

Something went wrong with that request. Please try again.