Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

there might be a typo #1

Merged
merged 1 commit into from

2 participants

@wongyouth

fix typo for 'kalss'

@encoreshao encoreshao merged commit d9beddb into encoreshao:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 23, 2013
  1. @wongyouth

    fixes typo

    wongyouth authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/china_regions/helpers/form_helper.rb
View
8 lib/china_regions/helpers/form_helper.rb
@@ -62,10 +62,10 @@ def set_options(method, options, region_klass)
def set_html_options(object, method, html_options, next_region)
html_options[:data] ? (html_options[:data][:region_klass] = "#{method.to_s}") : (html_options[:data] = { region_klass: "#{method.to_s}" })
if next_region
- html_options[:data].merge!(region_target: "#{object}_#{next_region.to_s}_id", region_target_kalss: next_region.to_s)
+ html_options[:data].merge!(region_target: "#{object}_#{next_region.to_s}_id", region_target_klass: next_region.to_s)
else
html_options[:data].delete(:region_target)
- html_options[:data].delete(:region_target_kalss)
+ html_options[:data].delete(:region_target_klass)
end
end
@@ -81,7 +81,7 @@ def js_output
self = $(event.currentTarget);
targetDom = $('#' + self.data('region-target'));
if (targetDom.size() > 0) {
- $.getJSON('/china_regions/fetch_options', {klass: self.data('region-target-kalss'), parent_klass: self.data('region-klass'), parent_id: self.val()}, function(data) {
+ $.getJSON('/china_regions/fetch_options', {klass: self.data('region-target-klass'), parent_klass: self.data('region-klass'), parent_id: self.val()}, function(data) {
$('option[value!=""]', targetDom).remove();
$.each(data, function(index, value) {
targetDom.append("<option value='" + value.id + "'>" + value.name + "</option>");
@@ -106,4 +106,4 @@ def region_select(methods, options = {}, html_options = {})
end
ActionView::Base.send :include, ChinaRegions::Helpers::FormHelper
-ActionView::Helpers::FormBuilder.send :include, ChinaRegions::Helpers::FormBuilder
+ActionView::Helpers::FormBuilder.send :include, ChinaRegions::Helpers::FormBuilder
Something went wrong with that request. Please try again.