Module: ActionView::Helpers::FormOptionsHelper
- Defined in:
- lib/countries.rb
Instance Method Summary collapse
- #country_options_for_select(selected = nil, priority_countries = nil) ⇒ Object
- #country_select(object, method, priority_countries = nil, options = {}, html_options = {}) ⇒ Object
Instance Method Details
#country_options_for_select(selected = nil, priority_countries = nil) ⇒ Object
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/countries.rb', line 53 def (selected = nil, priority_countries = nil) = "" if priority_countries += (priority_countries, selected) += "<option value=\"\" disabled=\"disabled\">-------------</option>\n" end return + (Country::Names, selected) end |
#country_select(object, method, priority_countries = nil, options = {}, html_options = {}) ⇒ Object
49 50 51 |
# File 'lib/countries.rb', line 49 def country_select(object, method, priority_countries = nil, = {}, = {}) InstanceTag.new(object, method, self, .delete(:object)).to_country_select_tag(priority_countries, , ) end |