Sha256: 11443fb2041851571f391feb8c04c2245d0072df4527ca0113e1a48367939288

Contents?: true

Size: 632 Bytes

Versions: 25

Compression:

Stored size: 632 Bytes

Contents

module CouchPotato
  module Validation
    def self.included(base) #:nodoc:
      case CouchPotato::Config.validation_framework
      when :validatable
        require 'couch_potato/validation/with_validatable'
        base.send :include, CouchPotato::Validation::WithValidatable
      when :active_model
        require 'couch_potato/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

25 entries across 25 versions & 3 rubygems

Version Path
couch_potato-0.6.0 lib/couch_potato/validation.rb
couch_potato-0.5.7 lib/couch_potato/validation.rb
couch_potato-rails2-0.5.10 lib/couch_potato/validation.rb
couch_potato-rails2-0.5.9 lib/couch_potato/validation.rb
couch_potato-rails2-0.5.8 lib/couch_potato/validation.rb
couch_potato-rails2-0.5.7 lib/couch_potato/validation.rb
couch_potato-rails2-0.5.6 lib/couch_potato/validation.rb
couch_potato-0.5.6 lib/couch_potato/validation.rb
couch_potato-0.5.5 lib/couch_potato/validation.rb
couch_potato-0.5.4 lib/couch_potato/validation.rb
couch_potato-0.5.3 lib/couch_potato/validation.rb
couch_potato-0.5.2 lib/couch_potato/validation.rb
couch_potato-0.5.1 lib/couch_potato/validation.rb
couch_potato-0.5.0 lib/couch_potato/validation.rb
davber_couch_potato-0.4.0 lib/couch_potato/validation.rb
couch_potato-0.4.0 lib/couch_potato/validation.rb
couch_potato-0.3.2 lib/couch_potato/validation.rb
couch_potato-0.3.1 lib/couch_potato/validation.rb
davber_couch_potato-0.3.0 lib/couch_potato/validation.rb
couch_potato-0.3.0 lib/couch_potato/validation.rb