Rails: url_for должен быть доступен в изолированном классе, который должен быть создан:
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
Как заставить url_for работать?я попытался расширить ActionController :: Base и ActionView :: Base, и я не могу: s