mod/pointer/set/abstract/02_pointer/other_views.rb in card-1.95.3 vs mod/pointer/set/abstract/02_pointer/other_views.rb in card-1.96.0

- old
+ new

@@ -25,15 +25,11 @@ pointer_items.join ", " end def pointer_items args={} page_args = args.extract! :limit, :offset - card.item_cards(page_args).map do |item_card| - nest_item item_card, args do |rendered, item_view| - wrap_item rendered, item_view - end - end + listing card.item_cards(page_args), args end end # JavaScript views @@ -52,10 +48,14 @@ end # JSON views format :json do + def item_cards + card.item_cards + end + def max_depth params[:max_depth] || 1 end def items_for_export @@ -65,9 +65,13 @@ def essentials return {} if depth > max_depth card.item_cards.map do |item| nest item, view: :essentials end + end + + view :links do + [] end end # CSS views