I’m developing a plugin for rails that ultimately needs to assign some
able to basically specify a partial and pass in a collection and then
render the results. Because I’m assigning the output to a variable
though I need to catch it and escape things like single quotes. The
two options I can immediately see are:
Create a method similar to render in my own class. This would do
the required operations on my object and then delegate the processing
to render in ActionView. My problem is, how do I actually call the
render method from within my own class?
Decorate the existing render method to recognise if my new object
type is passed in and react accordingly. My problem is, how do I do
that exactly? And in such away that if another developer wanted to do
the same thing it would then wrap both of our render methods and not
just overwrite the others?
Make sense? Any insight greatly appreciated