RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: mondev
you were right. found and fixed. thx!
aha. we're still using 1.8.7 :)
By the way, there's a small typo in the user_presenter.rb file:
delegate :username, to: :user
delegate :username, :to => :user
Great tutorial, as always! Quick question however. How can we use this technique for local objects inside partials?
We have a partial with a local variable called user (not @user). when trying to apply the same logic to it, i get back the following error 500:
ActionView::Template::Error (undefined method `to_presenter' for #<User:0x10b80f0a0>):
1: - present user do |user_presenter|
4: %dt Name