Displaying 1 result from an estimated 1 matches for "path_to_my_templ".
2006 Apr 20
0
Using render_to_string in other custom classes
...is when I want
to publish via email I don''t want to ask the controller to render the
views.
This is what I tried to do:
#/lib/myclass.rb
class foo
def build
@rts = ActionController::Base.new
file_x
file_y
end
def file_x
contents = @rts.render_to_string( path_to_my_template, self )
# and then I''d make the file etc
end
def file_y
contents = @rts.render_to_string( path_to_my_template, self )
# and then I''d make the file etc
end
end
the problem is that render_to_string is protected. Anyone know how I
can get around this?...