Rails: url_for to be available in a isolated class that must be instanced
- by Totty
Rails: url_for to be available in a isolated class that must be instanced:
class ProfilePresenter < ActionController::Base
attr_reader :profile
def initialize(profile)
super
@a = url_for(:controller => 'profiles', :action => 'view', :profile_url => 'dd')
@a
@profile = profile
end
end
How to make the url_for work?
i tried to extend the ActionController::Base and the ActionView::Base and i cant :s