views:

11

answers:

1

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.

+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
thanks i will try it :)
Totty