Class Markaby::Rails::RailsBuilder

  1. lib/markaby/rails/rails_builder.rb

Methods

public instance

  1. form_for

External Aliases

concat -> safe_concat

Public instance methods

form_for (*args) {|FormHelperProxy.new(@_helper, __form_for_variable)| ...}
[show source]
    # File lib/markaby/rails/rails_builder.rb, line 4
 4:       def form_for(*args, &block)
 5:         @_helper.output_buffer = OutputBuffer.new
 6: 
 7:         @template.form_for(*args) do |__form_for_variable|
 8:           # flush <form tags> + switch back to markaby
 9:           text(@_helper.output_buffer)
10:           @_helper.output_buffer = self
11: 
12:           yield FormHelperProxy.new(@_helper, __form_for_variable)
13: 
14:           # switch back to output string output buffer and flush
15:           # final </form> tag
16:           @_helper.output_buffer = OutputBuffer.new
17:         end
18:         text(@_helper.output_buffer)
19: 
20:         # finally, switch back to our regular buffer
21:         @_helper.output_buffer = self
22:       end