Sha256: 5b7256153c8e59d2d144d5cd81c8dc8522826daba24d3e12c8489f9075529667

Contents?: true

Size: 430 Bytes

Versions: 30

Compression:

Stored size: 430 Bytes

Contents

class InlineComponent < ViewComponent::Base
  def initialize(model, attribute)
    @model = model
    @attribute = attribute
    @unsuffixed_attribute = unsuffixed(attribute)
    @frame_id = dom_id(model, "#{attribute}_inline_edit")

    super
  end

  SUFIJOS = %i[f text].freeze
  def unsuffixed(attribute)
    ret = attribute.to_s.dup

    SUFIJOS.each do |sufijo|
      ret.gsub!(/_#{sufijo}$/, '')
    end

    ret
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
pg_rails-7.6.23 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.22 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.22.pre.3 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.22.pre.2 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.22.pre.1 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.11 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.10 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.9 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.8 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.7 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.6 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.5 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.4 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.3 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.2 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.21.pre.1 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.20 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.19 pg_engine/app/components/inline_edit/inline_component.rb
pg_rails-7.6.18 pg_engine/app/components/inline_edit/inline_component.rb