Sha256: af8687f983c58a132da1f3b68fbc5305b352b6b926b7001de5fb7b114f6c5bf4
Contents?: true
Size: 808 Bytes
Versions: 47
Compression:
Stored size: 808 Bytes
Contents
# frozen_string_literal: true module Plutonium module UI module Form class Interaction < Resource def initialize(interaction, *, **options, &) options[:key] = :interaction options[:resource_fields] = interaction.attribute_names.map(&:to_sym) - %i[resource resources] options[:resource_definition] = interaction super end private def form_action # interactive action forms post to the same page nil end def initialize_attributes super attributes.fetch(:data_turbo) { attributes[:data_turbo] = object.turbo.to_s } end def submit_button(*, **) super(*, **) do object.label end end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems