Skip to content

Commit 2968d9f

Browse files
committed
feature flag selector off from view
1 parent 86c43be commit 2968d9f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/views/tickets/index.html.haml

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
%strong
1616
= @conference.title
1717
.col-md-4.text-right
18-
.form-group
19-
%label{for: 'currency_selector'} Currency:
20-
= select_tag :currency, options_for_select(@currencies), id: 'currency_selector', class: 'form-control', style: 'width: auto; display: inline-block;'
18+
- if ENV['SHOW_CURRENCY_SELECTOR'] == 'true'
19+
.form-group
20+
%label{for: 'currency_selector'} Currency:
21+
= select_tag :currency, options_for_select(@currencies), id: 'currency_selector', class: 'form-control', style: 'width: auto; display: inline-block;'
2122
%table.table.table-hover
2223
%thead
2324
%tr

spec/features/ticket_purchases_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ def make_failed_stripe_purchase
198198

199199
context 'currency conversion' do
200200
before do
201+
ENV['SHOW_CURRENCY_SELECTOR'] = 'true'
201202
conference.currency_conversions << create(:currency_conversion, from_currency: 'USD', to_currency: 'EUR', rate: 0.89)
202203
conference.currency_conversions << create(:currency_conversion, from_currency: 'USD', to_currency: 'GBP', rate: 0.75)
203204
visit root_path

0 commit comments

Comments
 (0)