Imagine in rails I have @template that is an instance of ActionTemplate::View.
Question is: How can I convert @template whose @template.source is <%= "hello from erb" %> to hello from erb?? thanks
Try this...
ERB.new(@template.source).result
ERB#new
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With