Sha256: b9bf4d2e9dc6550f29317ae5a9a6b6ecf90187731cae5c27024419d2b621a1a0
Contents?: true
Size: 549 Bytes
Versions: 56
Compression:
Stored size: 549 Bytes
Contents
module PlutoniumUi class FormComponent < PlutoniumUi::Base option :form option :preferred_action_after_submit, default: proc { "show" } private def supported_actions_after_submit %w[show edit new index] end def action_after_submit_label(action) { "show" => "and view details", "edit" => "and continue editing", "new" => "and add another", "index" => "and view all" }[action] end end end Plutonium::ComponentRegistry.register :form, to: PlutoniumUi::FormComponent
Version data entries
56 entries across 56 versions & 1 rubygems