i18n_country_select 1.0.19 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e34e99a3b26cc00853cbf5d5dcd5c740c038a0c
|
4
|
+
data.tar.gz: 6612498e32156e8f87c16db1e877a255d1a00fdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33c79b176d6ce5f8aca40fc0fcc6b0081abcebbc466e28f45d9b10270cea46824627af1236a5b8ede346e7757bd4130cc7b18403a7e39047482886c2352a5c20
|
7
|
+
data.tar.gz: 19b4aee5c9102c2cb280314e6fc5ab4ca0cc1e6d52e530ff00367288a488eeafbc21782075a260dc96f984b546dbd9eac4b79fc9258fbfe8fd3fb447fb3d0fe5
|
data/README.rdoc
CHANGED
@@ -36,10 +36,12 @@ Supplying priority countries to be placed at the top of the list:
|
|
36
36
|
* Marten Klitzke (https://github.com/mortik)
|
37
37
|
* Victor D. (https://github.com/V1c70r)
|
38
38
|
* Alexey Degtyarev (https://github.com/alexhifer)
|
39
|
+
* Björn Wilmsmann (https://github.com/BjoernKW)
|
39
40
|
|
40
41
|
Based on the deprecated country_code_select by: Russ Smith (russ@bashme.org) and Frank Wambutt (frank@mo-stud.io)
|
41
42
|
|
42
43
|
== Version History
|
44
|
+
* 1.1.0 - Rails 4 support
|
43
45
|
* 1.0.19 - Added Macedonia
|
44
46
|
* 1.0.18 - Fixed translated sorting
|
45
47
|
* 1.0.17 - Removing duplicate country code IE
|
data/lib/i18n_country_select.rb
CHANGED
@@ -8,5 +8,9 @@ require "i18n_country_select/form_helpers"
|
|
8
8
|
require "i18n_country_select/instance_tag"
|
9
9
|
|
10
10
|
ActionView::Base.send(:include, I18nCountrySelect::FormHelpers)
|
11
|
-
|
11
|
+
if Rails::VERSION::MAJOR >= 4
|
12
|
+
ActionView::Helpers::ActiveModelInstanceTag.send(:include, I18nCountrySelect::InstanceTag)
|
13
|
+
else
|
14
|
+
ActionView::Helpers::InstanceTag.send(:include, I18nCountrySelect::InstanceTag)
|
15
|
+
end
|
12
16
|
ActionView::Helpers::FormBuilder.send(:include, I18nCountrySelect::FormBuilder)
|
@@ -1,7 +1,13 @@
|
|
1
1
|
module I18nCountrySelect
|
2
2
|
module FormHelpers
|
3
3
|
def country_code_select(object_name, method, priority_countries = nil, options = {}, html_options = {})
|
4
|
-
|
4
|
+
if Rails::VERSION::MAJOR >= 4
|
5
|
+
instance_tag = ActionView::Helpers::Tags::Select.new(object_name, method, self, [], options, html_options)
|
6
|
+
return instance_tag.to_country_code_select_tag(priority_countries, options.delete(:object), html_options)
|
7
|
+
else
|
8
|
+
instance_tag = ActionView::Helpers::InstanceTag.new(object_name, method, self, options.delete(:object))
|
9
|
+
return instance_tag.to_country_code_select_tag(priority_countries, options, html_options)
|
10
|
+
end
|
5
11
|
end
|
6
12
|
end
|
7
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_country_select
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian McQuay (brian@onomojo.com)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|