app/controllers/concerns/voluntary/v1/base_controller.rb in voluntary-0.5.2 vs app/controllers/concerns/voluntary/v1/base_controller.rb in voluntary-0.6.0
- old
+ new
@@ -24,9 +24,17 @@
@parent
end
protected
+ def product_serializer(class_name, record)
+ begin
+ "#{record.product.class.name.gsub('Product::', '')}#{class_name}Serializer".constantize.new(record)
+ rescue NameError
+ "#{class_name}Serializer".constantize.new(record)
+ end
+ end
+
def application_navigation
:main
end
def navigation_product_path
\ No newline at end of file