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