I’m trying to generate the url_for parameters ina controller to pass
down to a view. And I want to pass in the link_to() params. One of the
things I need to pass is the :controller part.
So I’m in the controller itself, and I want to change the self.class
(or it’s to_s represantation) to the format needed by link_to().
class MyController < ApplicationController
the_controller = self.class # or self.class.to_s
# here I want somethig like:
@controller_to_use = transform_to_string(the_controller)
Also, is there a way to call link_to() in a controller?