Sha256: 14bbdc2552be1bfd13390f3fd1120301e52b158b8019b22c7515f8a318a822c7

Contents?: true

Size: 330 Bytes

Versions: 10

Compression:

Stored size: 330 Bytes

Contents

module Tramway::Admin::AdditionalButtons
  def set_additional_buttons(buttons, project:)
    @additional_buttons ||= {}
    @additional_buttons[project] ||= {}
    @additional_buttons[project].merge! buttons
  end

  def additional_buttons(view: nil, record: nil, project: nil)
    @additional_buttons&.dig record, view
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tramway-admin-1.21.1 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.21 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.20.3 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.20.2.4 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.20.2.3 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.20.2.2 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.20.2.1 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.20.2 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.20.1 lib/tramway/admin/additional_buttons.rb
tramway-admin-1.20 lib/tramway/admin/additional_buttons.rb