Skip to content

Commit

Permalink
Remove support for unicode_hex in chargeback currencies
Browse files Browse the repository at this point in the history
Never been used and it would be need more work to add
more currencies.
  • Loading branch information
lpichler committed May 21, 2018
1 parent e915a3f commit aeac7cd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion app/models/chargeback_rate_detail_currency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class ChargebackRateDetailCurrency < ApplicationRecord
validates :name, :presence => true, :length => {:maximum => 100}
validates :full_name, :presence => true, :length => {:maximum => 100}
validates :symbol, :presence => true, :length => {:maximum => 100}
validates :unicode_hex, :presence => true, :length => {:minimum => 1}

has_many :chargeback_rate_detail, :foreign_key => "chargeback_rate_detail_currency_id"

Expand Down
6 changes: 1 addition & 5 deletions db/fixtures/chargeback_rate_detail_currencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
:name: "Dollars"
:full_name: "United States Dollars"
:symbol: "$"
:unicode_hex: "36"
- :code: "EUR"
:name: "Euro"
:full_name: "Euro"
:symbol: ""
:unicode_hex: "8364"
- :code: "GBP"
:name: "Pounds"
:full_name: "Pound Sterling"
:symbol: "£"
:unicode_hex: "163"
- :code: "JPY"
:name: "Yen"
:full_name: "Japanese Yen"
:symbol: "¥"
:unicode_hex: "165"
:symbol: "¥"
3 changes: 0 additions & 3 deletions spec/models/chargeback_rate_detail_currency_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@
it "is invalid without a symbol" do
expect(FactoryGirl.build(:chargeback_rate_detail_currency, :symbol => nil)).not_to be_valid
end
it "is invalid without a unicode_hex" do
expect(FactoryGirl.build(:chargeback_rate_detail_currency, :unicode_hex => nil)).not_to be_valid
end
end

0 comments on commit aeac7cd

Please sign in to comment.