From df60a7c4dcc49d59574d6fc4cdf7a948f9c395d2 Mon Sep 17 00:00:00 2001 From: Skud Date: Fri, 7 Jun 2013 11:36:03 +1000 Subject: [PATCH] display recommended price on product admin pages --- app/views/products/index.html.haml | 2 ++ app/views/products/show.html.haml | 6 +++++- spec/views/products/show.html.haml_spec.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/products/index.html.haml b/app/views/products/index.html.haml index 6a0cadb50..61940aaa8 100644 --- a/app/views/products/index.html.haml +++ b/app/views/products/index.html.haml @@ -5,6 +5,7 @@ %th Name %th Description %th Min price + %th Recommended price %th Account type %th Paid months %th @@ -16,6 +17,7 @@ %td= product.name %td= product.description %td= product.min_price + %td= product.recommended_price %td= product.account_type ? product.account_type.name : "" %td= product.paid_months %td= link_to 'Show', product diff --git a/app/views/products/show.html.haml b/app/views/products/show.html.haml index 874169c81..d8ea39456 100644 --- a/app/views/products/show.html.haml +++ b/app/views/products/show.html.haml @@ -5,10 +5,14 @@ = @product.name %p %b Description: - = @product.description + :markdown + #{@product.description} %p %b Min price: = @product.min_price +%p + %b Recommended price: + = @product.recommended_price %p %b Account type: = @product.account_type.name diff --git a/spec/views/products/show.html.haml_spec.rb b/spec/views/products/show.html.haml_spec.rb index 19d8256d7..12710a91f 100644 --- a/spec/views/products/show.html.haml_spec.rb +++ b/spec/views/products/show.html.haml_spec.rb @@ -9,7 +9,7 @@ describe "products/show" do render # Run the generator again with the --webrat flag if you want to use webrat matchers rendered.should contain @product.name - rendered.should contain @product.description rendered.should contain @product.min_price.to_s + rendered.should contain @product.recommended_price.to_s end end