Fixes for displaying categories

This commit is contained in:
2013-02-19 19:25:46 +01:00
parent 396a1cb737
commit 73e075fc64
7 changed files with 16 additions and 9 deletions
+8 -1
View File
@@ -1,5 +1,6 @@
class ProductDecorator < Draper::Base
class ProductDecorator < Draper::Decorator
decorates :product
delegate_all
def category_links(options = {})
if namespace = options[:namespace]
@@ -9,6 +10,12 @@ class ProductDecorator < Draper::Base
end
end
def display
"#{model.name} (#{h.currency(model.price)})".html_safe
end
# Accessing Helpers
# You can access any helper via a proxy
#