Module: PinboardItemsHelper

Defined in:
app/helpers/pinboard_items_helper.rb

Instance Method Summary (collapse)

Instance Method Details



3
4
5
6
7
8
9
# File 'app/helpers/pinboard_items_helper.rb', line 3

def pin_item_to_pinboard_link(object, user)
  if !object.pinned?(user)
    link_to((:span, 'Pin', class: 'pin-button'), pinboard_items_path(pinboard_item: {pinned_object_id: object.id, pinned_object_type: object.metamorphosize.class.name}), class: 'navigation-item' , method: :post)
  else
    (:span, 'Pinned', class: 'pin-button disable-button')
  end
end