Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed
  • Loading branch information
ancorcruz committed Mar 1, 2012
1 parent 544d240 commit fa4fcea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/validates_overlap/overlap_validator.rb
Expand Up @@ -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 (options[:class].constantize || 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


Expand Down

0 comments on commit fa4fcea

Please sign in to comment.