diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb index 30388d81..28e2fc99 100644 --- a/app/helpers/items_helper.rb +++ b/app/helpers/items_helper.rb @@ -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 diff --git a/app/views/items/_item_header.html.haml b/app/views/items/_item_header.html.haml index 42e3f53e..9925dc5f 100644 --- a/app/views/items/_item_header.html.haml +++ b/app/views/items/_item_header.html.haml @@ -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)