Sha256: a869f1d5cea000ce9b0e3840dbc3a103ca7bab3446d1023250f9199d3fc4dfff
Contents?: true
Size: 551 Bytes
Versions: 1
Compression:
Stored size: 551 Bytes
Contents
class InlineEditComponent < ViewComponent::Base def initialize(model, attribute) @model = model @attribute = attribute @frame_id = dom_id(model, "#{attribute}_inline_edit") @wrapper_mappings = { string: :inline_form_control, pg_associable: :inline_form_control, date: :inline_form_control, datetime: :inline_form_control, select: :inline_form_select } super end def before_render return unless controller.in_modal? controller.instance_variable_set(:@using_modal, true) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pg_rails-7.6.3 | pg_engine/app/components/inline_edit/inline_edit_component.rb |