Permalink
Browse files

remove warnings about validatable gem since it is now a dependency of…

… sequel_model
  • Loading branch information...
1 parent 55a1c2b commit 93f3a74d3fb8826b98ed00f6d38009cae6d9d187 Aman Gupta committed Dec 30, 2007
Showing with 13 additions and 17 deletions.
  1. +13 −17 model/lib/sequel_model/validations.rb
@@ -1,3 +1,5 @@
+require 'validatable'
+
module Sequel
class Model
# =Basic Sequel Validations
@@ -96,22 +98,16 @@ def method_missing(method, *args)
end
end
end
-
- begin
- require "validatable"
- include ::Validatable
- def self.validates(&block)
- Validations::Generator.new(self, &block)
- end
- # return true if there are validations stored, false otherwise
- def self.has_validations?
- validations.length > 0 ? true : false
- end
- rescue LoadError
- STDERR.puts <<-MESSAGE
- Install the validatable gem in order to use Sequel Model validations
- If you would like model validations to work, install the validatable gem
- MESSAGE
+
+ include ::Validatable
+
+ def self.validates(&block)
+ Validations::Generator.new(self, &block)
+ end
+
+ # return true if there are validations stored, false otherwise
+ def self.has_validations?
+ validations.length > 0 ? true : false
end
end
-end
+end

0 comments on commit 93f3a74

Please sign in to comment.