Use improved NC trade value text in item page
This commit is contained in:
parent
10708de615
commit
a4dd680445
2 changed files with 4 additions and 3 deletions
|
|
@ -184,7 +184,7 @@ module ItemsHelper
|
|||
# nicely for our use case.
|
||||
def nc_trade_value_estimate_text(nc_trade_value)
|
||||
match = nc_trade_value.value_text.match(NC_TRADE_VALUE_ESTIMATE_PATTERN)
|
||||
return nc_trade_value if match.nil?
|
||||
return nc_trade_value.value_text if match.nil?
|
||||
|
||||
match => {single:, low:, high:}
|
||||
if single.present?
|
||||
|
|
@ -192,7 +192,7 @@ module ItemsHelper
|
|||
elsif low.present? && high.present?
|
||||
"#{low}–#{high} capsules"
|
||||
else
|
||||
nc_trade_value
|
||||
nc_trade_value.value_text
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@
|
|||
%span{
|
||||
title: nc_trade_value_updated_at_text(item.nc_trade_value)
|
||||
}
|
||||
= t('items.show.resources.lebron', value: item.nc_trade_value.value_text)
|
||||
= t 'items.show.resources.lebron',
|
||||
value: nc_trade_value_estimate_text(item.nc_trade_value)
|
||||
- unless item.nc?
|
||||
= link_to t('items.show.resources.shop_wizard'), shop_wizard_url_for(item)
|
||||
= link_to t('items.show.resources.trading_post'), trading_post_url_for(item)
|
||||
|
|
|
|||
Loading…
Reference in a new issue