app/helpers/theme_helper.rb in woople-theme-0.0.6 vs app/helpers/theme_helper.rb in woople-theme-0.1.0
- old
+ new
@@ -17,12 +17,14 @@
def content_item_header
render partial: 'woople-theme/content_item_header'
end
- def outline(items, presenter = nil)
- collection = ThemePresentation.wrap_collection(items, OutlinePresenter, presenter)
- render partial: 'woople-theme/outline', collection: collection
+ def outline(item, &block)
+ presenter = ThemePresentation.wrap(item, OutlinePresenter)
+ presenter.view_context = self
+
+ render partial: 'woople-theme/outline', locals: { outline: presenter, block: block }
end
def profile
if !respond_to?(WoopleTheme.configuration.profile_helper)
raise "#{WoopleTheme.configuration.profile_helper} helper_method does not exist. WoopleTheme.configuration.profile_helper must point to a valid helper_method."