Sha256: c8b6fc70daf1e98109b73ce6a2e552e8b12161f8f2bb3d697213fd2d9ca03a69
Contents?: true
Size: 677 Bytes
Versions: 17
Compression:
Stored size: 677 Bytes
Contents
# frozen_string_literal: true module Katalyst module Content module Editor class ItemComponent < BaseComponent include KpopHelper def edit_item_link if item.persisted? helpers.katalyst_content.edit_item_path(item) else helpers.katalyst_content.new_item_path( item: item.attributes.slice("type", "container_id", "container_type").compact, ) end end def default_html_attributes { id: dom_id(item), data: { controller: ITEM_CONTROLLER, }, } end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems