1
class ProfilePresenter < ActionView::Base
def initialize
super
url_for # i got: You have a nil object when you didn't expect it!
# The error occurred while evaluating nil.url_for
end
end
url_for不起作用。为什么?class ProfilePresenter <ActionView :: Base | url_for不起作用。为什么?
我作出这样
ProfilePresenter.new
如果你解决你自己的答案,这是最好写的解答在答案然后接受它。 – 2010-05-29 02:13:12