Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module HelperExtensions
- def self.included base
- base.class_eval do
- def extend_with_extensions(*args)
- extend_without_extensions(*args)
- methods.grep(/helper_actions/).each do |helper|
- self.instance_eval <<-END
- def self.#{helper}_with_clone
- res = self.send("#{helper}_without_clone")
- res += " lo he conseguido!!!"
- res
- end
- class <<self;self end.class_eval do
- alias_method_chain helper.to_sym, :clone
- end
- END
- end
- end
- alias_method_chain :extend, :extensions
- end
- end
- end
- ::ActionView::Base.send(:include, ::HelperExtensions)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement