Displaying 1 result from an estimated 1 matches for "controller_to_use".
2005 Dec 18
0
Fromcontroller to the url_for() representation
...ntroller itself, and I want to change the self.class
(or it''s to_s represantation) to the format needed by link_to().
For example:
class MyController < ApplicationController
def show_something
the_controller = self.class # or self.class.to_s
# here I want somethig like:
@controller_to_use = transform_to_string(the_controller)
end
end
Also, is there a way to call link_to() in a controller?
Thanks,
Guy.