Sha256: c33428b7f4c9e71672172f56393944999cdc749cb53cdda7fd2136e475ffaaa5

Contents?: true

Size: 411 Bytes

Versions: 17

Compression:

Stored size: 411 Bytes

Contents

require 'active_model'
require 'active_model/translation'

module CouchPotato
  module Validation
    def self.included(base) #:nodoc:
      base.send :include, ::ActiveModel::Validations
      base.send :include, ::ActiveModel::Validations::Callbacks
    end
  end
end

# provide same interface to errors object as in Validatable
module ::ActiveModel
  class Errors
    def errors
      self
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
couch_potato-1.7.1 lib/couch_potato/validation.rb
couch_potato-1.7.0 lib/couch_potato/validation.rb
couch_potato-1.6.5 lib/couch_potato/validation.rb
couch_potato-1.6.4 lib/couch_potato/validation.rb
couch_potato-1.6.3 lib/couch_potato/validation.rb
couch_potato-1.4.0 lib/couch_potato/validation.rb
couch_potato-1.3.0 lib/couch_potato/validation.rb
couch_potato-1.2.0 lib/couch_potato/validation.rb
couch_potato-1.1.4 lib/couch_potato/validation.rb
couch_potato-1.1.2 lib/couch_potato/validation.rb
couch_potato-1.1.1 lib/couch_potato/validation.rb
couch_potato-1.1.0 lib/couch_potato/validation.rb
couch_potato-1.0.1 lib/couch_potato/validation.rb
couch_potato-1.0.0 lib/couch_potato/validation.rb
couch_potato-0.7.1 lib/couch_potato/validation.rb
couch_potato-0.7.0 lib/couch_potato/validation.rb
couch_potato-0.7.0.pre.1 lib/couch_potato/validation.rb