Sha256: 347a81014e277a1ffda99287f22ae4df65af0315e7c363970a0cef00a4a058e8

Contents?: true

Size: 441 Bytes

Versions: 10

Compression:

Stored size: 441 Bytes

Contents

# frozen_string_literal: true

module Phlexi
  module Field
    module Options
      module Attachments
        def attachment_reflection
          @attachment_reflection ||= find_attachment_reflection
        end

        protected

        def find_attachment_reflection
          if object.class.respond_to?(:reflect_on_attachment)
            object.class.reflect_on_attachment(key)
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
phlexi-field-0.0.11 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.10 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.9 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.8 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.7 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.6 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.5 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.4 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.3 lib/phlexi/field/options/attachments.rb
phlexi-field-0.0.2 lib/phlexi/field/options/attachments.rb