china 1.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b66a13a744a951853e2848a2c62c8bcdb3fc649d
|
4
|
+
data.tar.gz: 1df5fb6643bfee2886cd748f957a80f6f92dc80e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c718d4c141464b3064f4c1e5958a27b9c2f0d121586713b57fdcb5eb447a12f5ed6c7c0093b4c747fa6ce967a01d7ac2b57d51e96e9132dae6e4db22021db3c5
|
7
|
+
data.tar.gz: 470826b331b84c2ad3667d86282ccab18f568873c41f75389d5236c2a3f31144e6ce710f3af1e3b8d1e14601c57cd378e8a7b54ce65d5af382591fdc147ebc65
|
data/lib/china/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: china
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sharp
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: yajl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: "中国省市区选择"
|
@@ -56,10 +56,6 @@ files:
|
|
56
56
|
- app/assets/stylesheets/sharp_zones/sharp_zones.css
|
57
57
|
- app/controllers/china/application_controller.rb
|
58
58
|
- app/controllers/china/sharp_cities_controller.rb
|
59
|
-
- app/helpers/sharp_zones/application_helper.rb
|
60
|
-
- app/helpers/sharp_zones/sharp_cities_helper.rb
|
61
|
-
- app/helpers/sharp_zones/sharp_zones_helper.rb
|
62
|
-
- app/inputs/simple_form.rb
|
63
59
|
- app/views/layouts/sharp_zones/application.html.erb
|
64
60
|
- app/views/sharp_cities/_select.html.erb
|
65
61
|
- app/views/sharp_cities/_simple_form_select.html.erb
|
data/app/inputs/simple_form.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
module SharpZones
|
2
|
-
module SimpleForm
|
3
|
-
class CityInput < ::SimpleForm::Inputs::Base
|
4
|
-
def input
|
5
|
-
out = '' # the output string we're going to build
|
6
|
-
# check if there's an uploaded file (eg: edit mode or form not saved)
|
7
|
-
if object.send("#{attribute_name}?")
|
8
|
-
# append preview image to output
|
9
|
-
#select_tag(:city_id, '<option value="1">Lisbon</option>...')
|
10
|
-
out << template.select_tag(object.send(attribute_name), options_for_select(SharpZones::City.all.map { |c| [c.name, c.code] }))
|
11
|
-
end
|
12
|
-
# append file input. it will work accordingly with your simple_form wrappers
|
13
|
-
#(out << @builder.file_field(attribute_name, input_html_options)).html_safe
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
::SimpleForm::FormBuilder.map_type :city_input, :to => RailsKindeditor::SimpleForm::CityInput
|