Fixes for displaying categories
This commit is contained in:
@@ -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
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user