Sha256: e681a8969a81391c4310e6b60e8f8da6794f6c0b3a1f6db9c732dccaa2266543

Contents?: true

Size: 492 Bytes

Versions: 6

Compression:

Stored size: 492 Bytes

Contents

module Attachs
  module Extensions
    module ActiveRecord
      module Base
        extend ActiveSupport::Concern

        module ClassMethods

          def has_attachment(*args)
            builder = Builder.new(self)
            builder.define *args
          end

          def has_attachments(*args)
            options = args.extract_options!
            options[:multiple] = true
            has_attachment *args.append(options)
          end

        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
attachs-4.0.0.5 lib/attachs/extensions/active_record/base.rb
attachs-4.0.0.4 lib/attachs/extensions/active_record/base.rb
attachs-4.0.0.3 lib/attachs/extensions/active_record/base.rb
attachs-4.0.0.2 lib/attachs/extensions/active_record/base.rb
attachs-4.0.0.1 lib/attachs/extensions/active_record/base.rb
attachs-4.0.0.0 lib/attachs/extensions/active_record/base.rb