Rails 4 - Sanitize帮助程序无法在heroku

时间:2016-06-28 15:40:32

标签: ruby-on-rails-4

我正在研究Agile Rails 4书。 我设置了Cloud9工作环境,每次迭代后,我将项目部署到Heroku。

这里有一个问题:我使用清洁助手来显示我的目录。在我的本地服务器上(在cloud9中)它没有任何问题,但是当我部署到heroku时,帮助程序无法正常工作。

示例:清理时,输出数据位于<p>标记内。在heroku上,标记<p>不存在。

- if notice
    %p.notice= notice

%h1 Your Pragmatic catalog
- cache ['store', Product.latest] do
    - @products.each do |product|
        -cache ['entry', product] do    
            .entry
                = image_tag(product.image_url)
                %h3= product.title
                = sanitize(product.description) 
                .price_line
                    %span.price= number_to_currency(product.price)
                    = button_to "Add to Cart", line_items_path(product_id: product)

有什么想法吗?

0 个答案:

没有答案