Hello. I am writing a table helper and am wondering how to get the current page url to display. Or how to get the current controller instance inside a helper ? Here''s the code module ApplicationHelper class Table def initialize(c,options) @collection=c @options=options @columns=Array.new end def print How to get current page''s url here ??? end end end -- Karol Hosiawa
On Sun, 2005-05-01 at 21:03 +0200, Karol Hosiawa wrote:> def print > How to get current page''s url here ???Karol, is this what you want : url_for(:only_path=>false)> endso then, in your view you could say: <%= print %> HTH, Howard