forked from manafire/country_code_select
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,10 +36,12 @@ Supplying priority countries to be placed at the top of the list: | |
* Marten Klitzke (https://github.com/mortik) | ||
* Victor D. (https://github.com/V1c70r) | ||
* Alexey Degtyarev (https://github.com/alexhifer) | ||
* Björn Wilmsmann (https://github.com/BjoernKW) | ||
|
||
Based on the deprecated country_code_select by: Russ Smith ([email protected]) and Frank Wambutt ([email protected]) | ||
|
||
== Version History | ||
* 1.1.0 - Rails 4 support | ||
* 1.0.19 - Added Macedonia | ||
* 1.0.18 - Fixed translated sorting | ||
* 1.0.17 - Removing duplicate country code IE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
module I18nCountrySelect | ||
module FormHelpers | ||
def country_code_select(object_name, method, priority_countries = nil, options = {}, html_options = {}) | ||
ActionView::Helpers::InstanceTag.new(object_name, method, self, options.delete(:object)).to_country_code_select_tag(priority_countries, options, html_options) | ||
if Rails::VERSION::MAJOR >= 4 | ||
instance_tag = ActionView::Helpers::Tags::Select.new(object_name, method, self, [], options, html_options) | ||
return instance_tag.to_country_code_select_tag(priority_countries, options.delete(:object), html_options) | ||
else | ||
instance_tag = ActionView::Helpers::InstanceTag.new(object_name, method, self, options.delete(:object)) | ||
return instance_tag.to_country_code_select_tag(priority_countries, options, html_options) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module I18nCountrySelect | ||
VERSION = "1.0.19" | ||
VERSION = "1.1.0" | ||
end |