class ComfyBlog::FormBuilder < ActionView::Helpers::FormBuilder helpers = field_helpers - %w(hidden_field fields_for) + %w(select) helpers.each do |name| class_eval %Q^ def #{name}(field, *args) options = args.extract_options! args << options return super if options.delete(:disable_builder) default_field('#{name}', field, options){ super } end ^ end def default_field(type, field, options = {}, &block) errors = if object.respond_to?(:errors) && object.errors[field].present? "