Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (field_helpers - %w(label check_box radio_button fields_for)).each do |selector|
- # def text_field(method, options = {})
- # @template.send("text_field", @object_name, method, objectify_options(options))
- # end
- src = <<-end_src
- def #{selector}(method, options = {})
- @template.send(#{selector.inspect}, @object_name, method, objectify_options(options))
- end
- end_src
- class_eval src, __FILE__, __LINE__
- end
Add Comment
Please, Sign In to add comment