Sha256: a0416fd1901e1be7d8d3b39193617756fa92053c3d1b774849a74784ebcbf60b

Contents?: true

Size: 658 Bytes

Versions: 5

Compression:

Stored size: 658 Bytes

Contents

module CouchPotato
  module Validation
    def self.included(base) #:nodoc:
      case CouchPotato::Config.validation_framework
      when :validatable
        require File.dirname(__FILE__) + '/validation/with_validatable'
        base.send :include, CouchPotato::Validation::WithValidatable
      when :active_model
        require File.dirname(__FILE__) + '/validation/with_active_model'
        base.send :include, CouchPotato::Validation::WithActiveModel
      else
        raise "Unknown CouchPotato::Config.validation_framework #{CouchPotato::Config.validation_framework.inspect}, options are :validatable or :active_model"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
couch_potato-0.2.27 lib/couch_potato/validation.rb
couch_potato-0.2.26 lib/couch_potato/validation.rb
couch_potato-0.2.25 lib/couch_potato/validation.rb
couch_potato-0.2.24 lib/couch_potato/validation.rb
couch_potato-0.2.23 lib/couch_potato/validation.rb