Module: CustomTable::FieldsetHelper

Defined in:
app/helpers/custom_table/fieldset_helper.rb

Defined Under Namespace

Classes: FieldsetBuilder

Instance Method Summary collapse

Instance Method Details

#field(object, column, **params, &block) ⇒ Object



79
80
81
82
83
84
85
86
87
# File 'app/helpers/custom_table/fieldset_helper.rb', line 79

def field object, column, **params, &block

  params[:template] = "field_plain"

  builder = FieldsetBuilder.new(object, self, **params)

  builder.field(column, **params, &block)

end

#fieldset(object = nil, **params, &block) ⇒ Object



68
69
70
71
72
73
74
75
76
77
# File 'app/helpers/custom_table/fieldset_helper.rb', line 68

def fieldset object=nil, **params, &block

  builder = FieldsetBuilder.new(object, self, **params)
  output = capture(builder, &block)

  render "custom_table/fieldset" do
    output
  end

end