Module: Sequel::Plugins::Forme::SinatraSequelForm

Defined in:
lib/sequel/plugins/forme.rb

Overview

Helper module used for Sequel/Sinatra forms. Necessary for proper subform handling when using such forms with partials.

Instance Method Summary collapse

Instance Method Details

#subform(&block) ⇒ Object

Capture the inside of the inputs, injecting it into the template if a block is given, or returning it as a string if not.



476
477
478
479
480
481
482
# File 'lib/sequel/plugins/forme.rb', line 476

def subform(*, &block)
  if block
    capture(block){super}
  else
    capture{super}
  end
end