Sha256: 045f81a164e8e15885666c8c080c0c9699f6bb4641c6f5975aab6b3b4ab32dec

Contents?: true

Size: 176 Bytes

Versions: 15

Compression:

Stored size: 176 Bytes

Contents

module DataMapper
  module Resource

    def errors_on(property)
      self.valid?
      errors.send(:errors)[property] or []
    end

    alias :error_on :errors_on
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
dm-rspec-0.3.0 lib/dm/resource.rb
dm-rspec-0.2.4 lib/dm/resource.rb
dm-rspec2-0.3.0 lib/dm/resource.rb
dm-rspec-0.2.3 lib/dm/resource.rb
dm-rspec-0.2.2 lib/dm/resource.rb
dm-rspec2-0.2.4 lib/dm/resource.rb
dm-rspec2-0.2.3 lib/dm/resource.rb
dm-rspec2-0.2.2 lib/dm/resource.rb
dm-rspec2-0.2.1 lib/dm/resource.rb
dm-rspec-0.2.1 lib/dm/resource.rb
dm-rspec-0.2.0 lib/dm/resource.rb
dm-rspec-0.1.2 lib/dm/resource.rb
dm-rspec-0.1.1 lib/dm/resource.rb
dm-rspec-0.1.0 lib/dm/resource.rb
dm-rspec-0.0.2 lib/dm/resource.rb