Sha256: f5032e5db9cd4df44db73ea44e9a49601799aaa6b8fb6116664197fc891b42fc

Contents?: true

Size: 474 Bytes

Versions: 4

Compression:

Stored size: 474 Bytes

Contents

require 'active_resource/validations'
class ActiveResource::Errors < ActiveModel::Errors
  # Patched cause we dont need no attribute name magic .. and its just simpler
  # orig version is looking up the humanized name of the attribute in the error
  # message, which we dont supply => only field name is used in returned error msg
  def from_array(messages, save_cache=false)
    clear unless save_cache
    messages.each do |msg|
      add msg[0], msg[1]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sk_sdk-0.4.3 lib/sk_sdk/ar_patches/ar4/validations.rb
sk_sdk-0.4.2 lib/sk_sdk/ar_patches/ar4/validations.rb
sk_sdk-0.4.1 lib/sk_sdk/ar_patches/ar4/validations.rb
sk_sdk-0.4.0 lib/sk_sdk/ar_patches/ar4/validations.rb