Module: Para::Admin::HistoryHelper

Defined in:
app/helpers/para/admin/history_helper.rb

Instance Method Summary collapse

Instance Method Details

#history_for(component, action:, **options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'app/helpers/para/admin/history_helper.rb', line 4

def history_for(component, action:, **options)
  return unless component.history?

  partial_path = find_partial_for(
    (options[:resource] || options[:relation]),
    "history/#{ action }"
  )

  render partial: partial_path, locals: options
end