Class: SiteSettings::FormComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/site_settings/form_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings:, settings_path:) ⇒ FormComponent

Returns a new instance of FormComponent.



3
4
5
6
# File 'app/components/site_settings/form_component.rb', line 3

def initialize(settings:, settings_path:)
  @settings = settings
  @settings_path = settings_path
end

Instance Attribute Details

#settingsObject (readonly)

Returns the value of attribute settings.



8
9
10
# File 'app/components/site_settings/form_component.rb', line 8

def settings
  @settings
end

#settings_pathObject (readonly)

Returns the value of attribute settings_path.



8
9
10
# File 'app/components/site_settings/form_component.rb', line 8

def settings_path
  @settings_path
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/components/site_settings/form_component.rb', line 10

def render?
  @settings.present?
end