class Trestle::Table::ActionsColumn
Attributes
options[R]
toolbar[R]
Public Class Methods
new(options={}, &block)
click to toggle source
# File lib/trestle/table/actions_column.rb, line 6 def initialize(options={}, &block) @options = options @toolbar = Toolbar.new(ActionsBuilder) if block_given? @toolbar.append(&block) else @toolbar.append(&default_actions) end end
Public Instance Methods
default_actions()
click to toggle source
# File lib/trestle/table/actions_column.rb, line 21 def default_actions ->(toolbar, instance, admin) do toolbar.delete if admin && admin.actions.include?(:destroy) end end
renderer(table:, template:)
click to toggle source
# File lib/trestle/table/actions_column.rb, line 17 def renderer(table:, template:) Renderer.new(self, table: table, template: template) end