currency_select 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "currency_select"
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Trond Arve Nordheim"]
12
- s.date = "2013-08-03"
12
+ s.date = "2013-08-05"
13
13
  s.description = "Adds a currency_select helper to Ruby on Rails projects"
14
14
  s.email = "tanordheim@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -19,7 +19,7 @@ module CurrencySelect
19
19
  # priority_currencies_array([ "USD", "NOK" ])
20
20
  # # => [ ['United States Dollar - USD', 'USD' ], ['Norwegian Kroner - NOK', 'NOK'] ]
21
21
  def priority_currencies_array(currency_codes = [])
22
- currencies_array.select { |currency| currency_codes.include?(currency.last.to_s) }
22
+ currency_codes.flat_map { |code| currencies_array.select { |currency| currency.last.to_s == code }}
23
23
  end
24
24
 
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currency_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-03 00:00:00.000000000 Z
12
+ date: 2013-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: money