This partial was going to get too complex since in some places we've got different texts, different URLs or different confirmation messages. While we should probably try to be more consistent and that would make the partial work in most cases, there'll always be some exceptions, and using a partial (with, perhaps, some helper methods) will become messy really quickly.
9 lines
198 B
Ruby
9 lines
198 B
Ruby
class Admin::TableActionsComponent < ApplicationComponent
|
|
attr_reader :record, :actions
|
|
|
|
def initialize(record, actions: [:edit, :destroy])
|
|
@record = record
|
|
@actions = actions
|
|
end
|
|
end
|