Sha256: 46dcb5547268f7e0731934d9bcca94f24b2c4be6906d101a1e3628204724a120

Contents?: true

Size: 399 Bytes

Versions: 1

Compression:

Stored size: 399 Bytes

Contents

module Medea
  module ActiveModelMethods
    def to_model
      jason_key
    end

    def errors
      obj = Object.new
      def obj.[](key)         []    end
      def obj.full_messages() []    end
      def obj.any?()          false end
      def count               0     end
      obj
    end

    def persisted?
      jason_state == :stale
    end

    def valid?
      true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
medea-0.2.17 lib/medea/active_model_methods.rb