Guest User

Untitled

a guest
Feb 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. (field_helpers - %w(label check_box radio_button fields_for)).each do |selector|
  2. # def text_field(method, options = {})
  3. # @template.send("text_field", @object_name, method, objectify_options(options))
  4. # end
  5. src = <<-end_src
  6. def #{selector}(method, options = {})
  7. @template.send(#{selector.inspect}, @object_name, method, objectify_options(options))
  8. end
  9. end_src
  10. class_eval src, __FILE__, __LINE__
  11. end
Add Comment
Please, Sign In to add comment