class Showbuilder::Builders::FormBuilder
Public Class Methods
new(template)
click to toggle source
# File lib/showbuilder/builders/form_builder.rb, line 10 def initialize(template) @template = template end
Public Instance Methods
show_current_itext_base()
click to toggle source
# File lib/showbuilder/builders/form_builder.rb, line 47 def show_current_itext_base self.controller_name.to_s.singularize + '.form' end
show_email_input(method)
click to toggle source
# File lib/showbuilder/builders/form_builder.rb, line 22 def show_email_input(method) self.show_method_shell(method) do self.contents_tag(:div, :class => "input-append") do |contents| contents << self.email_field_tag(method, nil, :class => 'xlarge', :id => 'xlInput') contents << self.content_tag(:span, "@", :class => "add-on") end end end
show_method_shell(method) { || ... }
click to toggle source
# File lib/showbuilder/builders/form_builder.rb, line 37 def show_method_shell(method) self.contents_tag :div, :class => :clearfix do |contents| label_text = self.show_current_itext(method) contents << self.label(method, label_text) contents << self.content_tag(:div, :class => :input) do yield end end end
show_password_input(method)
click to toggle source
# File lib/showbuilder/builders/form_builder.rb, line 31 def show_password_input(method) self.show_method_shell(method) do self.password_field_tag(method, nil, :class => 'xlarge', :id => 'xlInput') end end
show_text_input(method, options = {})
click to toggle source
# File lib/showbuilder/builders/form_builder.rb, line 14 def show_text_input(method, options = {}) options ||={} html_options = options[:html] self.show_method_shell(method) do self.text_field_tag(method, nil, :class => 'xlarge', :id => 'xlInput') end end