Sha256: b5ff1119fc6cadd7ebf7452995f47871fccf303df21516484c2f8ac0f9a028a2

Contents?: true

Size: 534 Bytes

Versions: 6

Compression:

Stored size: 534 Bytes

Contents

module Brightcontent
  module BaseHelper
    def render_list_field(item, field)
      ViewLookup::ListField.new(self, item: item, field: field).call
    end

    def render_filter_field(form, field)
      ViewLookup::FilterField.new(self, field: field, form: form).call
    end

    def render_form_field(form, field)
      ViewLookup::FormField.new(self, item: form.object, field: field, form: form).call
    end

    def render_if_exists(*args)
      render(*args)
    rescue ActionView::MissingTemplate
      nil
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
brightcontent-core-2.1.5 app/helpers/brightcontent/base_helper.rb
brightcontent-core-2.1.4 app/helpers/brightcontent/base_helper.rb
brightcontent-core-2.1.3 app/helpers/brightcontent/base_helper.rb
brightcontent-core-2.1.2 app/helpers/brightcontent/base_helper.rb
brightcontent-core-2.1.1 app/helpers/brightcontent/base_helper.rb
brightcontent-core-2.1.0 app/helpers/brightcontent/base_helper.rb