Class: UbigeoInput

Inherits:
Object
  • Object
show all
Includes:
Formtastic::Inputs::Base
Defined in:
app/inputs/ubigeo_input.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ubigeoObject (readonly)

Returns the value of attribute ubigeo.



5
6
7
# File 'app/inputs/ubigeo_input.rb', line 5

def ubigeo
  @ubigeo
end

Instance Method Details

#to_htmlObject



7
8
9
10
11
12
# File 'app/inputs/ubigeo_input.rb', line 7

def to_html
  input_wrapping do
    load_ubigeo
    department_html << province_html << district_html << hidden_field_html
  end
end

#wrapper_html_optionsObject



14
15
16
17
18
19
20
# File 'app/inputs/ubigeo_input.rb', line 14

def wrapper_html_options
  wrapper_html_options_raw.tap do |opts|
    opts[:class] = classes
    opts[:id] ||= wrapper_dom_id
    opts['data-url'] = options[:url] || ubigeo_rails_path
  end
end