class RobotCatcher::Helpers::FormBuilder

Public Class Methods

create_tagged_field(method_name) click to toggle source
Calls superclass method
# File lib/robot_catcher/helpers.rb, line 12
def self.create_tagged_field(method_name)
  define_method(method_name) do |label, *args|
    if method_name.eql? "label"
      super(label, *args)
    else
      hash_tag = Digest::MD5.hexdigest(label.to_s + @spinner + "robotcatcher")
      @template.text_field_tag(hash_tag, nil, :style=>"display:none") +
       super(label, *args)
    end
  end
end
new(object_name, object, template, options) click to toggle source
Calls superclass method
# File lib/robot_catcher/helpers.rb, line 7
def initialize(object_name, object, template, options)        
  @spinner = options[:spinner]
  super(object_name, object, template, options, nil)
end