Sha256: fc031e83f8256fc07ed6c37dbbec604e73d884d85fa57a1b01d4551bbaa81fc5

Contents?: true

Size: 295 Bytes

Versions: 11

Compression:

Stored size: 295 Bytes

Contents

module RailsUploads
  module Validators
    class Base < ActiveModel::EachValidator
      
      protected
      
      def add_error(record, attribute, type, options={})
        record.errors[attribute] << (options[:message] || I18n.t(type, options))        
      end
      
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rails_uploads-0.2.9 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.8 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.7 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.6 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.5 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.4 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.3 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.2 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.1 lib/rails_uploads/validators/base.rb
rails_uploads-0.2.0 lib/rails_uploads/validators/base.rb
rails_uploads-0.1.5 lib/rails_uploads/validators/base.rb