Class: Markaby::Rails::RailsBuilder::FormHelperProxy

### Home Classes Methods

### In Files

- lib/markaby/rails/rails_builder.rb

### Parent

Object

### Methods

- ::new
- #respond_to?

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Markaby
- Markaby::Builder
- Markaby::BuilderTags
- Markaby::CssProxy
- Markaby::Fragment
- Markaby::InvalidXhtmlError
- Markaby::Rails
- Markaby::Rails::ActionControllerHelpers
- Markaby::Rails::Helpers
- Markaby::Rails::RailsBuilder
- Markaby::Rails::RailsBuilder::FormHelperProxy
- Markaby::Rails::RailsBuilder::OutputBuffer
- Markaby::Rails::Template
- Markaby::Rails::TemplateHandler
- Markaby::Stream
- Markaby::Tilt
- Markaby::XHTMLFrameset
- Markaby::XHTMLStrict
- Markaby::XHTMLTransitional
- Markaby::XmlMarkup
- Sinatra
- Sinatra::Base
- Sinatra::Templates
- Kernel
- Object

No matching classes.

# Markaby::Rails::RailsBuilder::FormHelperProxy

This is used for the block variable given to form_for. Typically, an erb template looks as so:

    <% form_for :foo do |f|
      <%= f.text_field :bar %>
    <% end %>

form_for adds the form tag to the input stream, and assumes that later the user will append the <input> tag to the input stream himself (in erb, this is done with the <%= %> tags).

We could do the following in Markaby:

    form_for :foo do |f|
      text f.text_field(:bar)
    end

But this is ugly. This is prettier:

    form_for :foo do |f|
      f.text_field :bar
    end

### Public Class Methods

new(view, proxied_object) click to toggle source

    # File lib/markaby/rails/rails_builder.rb, line 56
    def initialize(view, proxied_object)
      @view           = view
      @proxied_object = proxied_object
    end

### Public Instance Methods

respond_to?(sym, include_private = false) click to toggle source

    # File lib/markaby/rails/rails_builder.rb, line 61
    def respond_to?(sym, include_private = false)
      @proxied_object.respond_to?(sym, include_private) || super
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.