Sha256: 40839bec65255ec3641f252c4d4a900a74986ab26466b73c101a60b6f3e90da1

Contents?: true

Size: 448 Bytes

Versions: 10

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

module Phlexi
  module Field
    module Options
      module Associations
        def association_reflection
          @association_reflection ||= find_association_reflection
        end

        protected

        def find_association_reflection
          if object.class.respond_to?(:reflect_on_association)
            object.class.reflect_on_association(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/associations.rb
phlexi-field-0.0.10 lib/phlexi/field/options/associations.rb
phlexi-field-0.0.9 lib/phlexi/field/options/associations.rb
phlexi-field-0.0.8 lib/phlexi/field/options/associations.rb
phlexi-field-0.0.7 lib/phlexi/field/options/associations.rb
phlexi-field-0.0.6 lib/phlexi/field/options/associations.rb
phlexi-field-0.0.5 lib/phlexi/field/options/associations.rb
phlexi-field-0.0.4 lib/phlexi/field/options/associations.rb
phlexi-field-0.0.3 lib/phlexi/field/options/associations.rb
phlexi-field-0.0.2 lib/phlexi/field/options/associations.rb