I have a ruby view that has this namespace: ActionView::Base.new but i want to add a new method to be available to this ActionView::Base class.
views:
11answers:
1
+1
A:
in myapp/lib/action_view_monkey_patch.rb do:
ActionView::Base.class_eval do
def method_name
#do some stuff
end
end
Patrick Klingemann
2010-05-16 00:19:14
thanks i will try it :)
Totty
2010-05-16 03:00:37