Class: PathInput

Inherits:
SimpleForm::Inputs::TextInput
  • Object
show all
Defined in:
app/inputs/path_input.rb

Instance Method Summary collapse

Instance Method Details

#input(_wrapper_options = nil) ⇒ Object



3
4
5
6
7
8
9
10
# File 'app/inputs/path_input.rb', line 3

def input(_wrapper_options = nil)
  if forecasting_a_new_section?
    options[:hint] = "Forecast: Saving this first #{object.class.display_name} will create a new section at #{object.class.path}."
  end
  html = template.(:span, object.class.base_path, data:{type: 'base-path'})
  html << @builder.text_field(:slug, class: ['input-xxlarge', 'slug-dest'])
  html
end