Module: EmptyEye::BaseMethods

Included in:
ActiveRecord::Base
Defined in:
lib/empty_eye/base_methods.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
# File 'lib/empty_eye/base_methods.rb', line 4

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#valid?(context = nil) ⇒ Boolean

Returns:

  • (Boolean)


64
65
66
67
68
69
# File 'lib/empty_eye/base_methods.rb', line 64

def valid?(context = nil)
  context ||= (new_record? ? :create : :update)
  output = super(context)
  return errors.empty? && output unless mti_class?
  shard_wrangler.valid?(context) && errors.empty? && output
end