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:
ruby
ActionView::Template::Error (undefined method `to_presenter' for #<User:0x10b80f0a0>):
1: - present user do |user_presenter|
2: #contact_information
3: %dl
4: %dt Name
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:
should be
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: