ruby on rails - asset_path does not work in some views -
can't resolve issue in rails 4 app. me please.
in controller in 'show' action try render view 'textile':
render "textile" if @wallcovering.material.id == 2 || @catalog.id == 10 in view 'textile.html.erb' have:
<%= image_tag "#{@catalog.title}/#{@wallcovering.title}.jpg", id: "textile_image" %> but in page source in production there plain path, without md5, , image couldn't found. even
<%= asset_path("#{@catalog.title}/#{@wallcovering.title}.jpg") %> shows me plain path. have tag in view:
<%= link_to catalog_wallcovering_path(@catalog, wallcovering), data: { remote: true, bgpath: asset_path("#{@catalog.slug}/#{wallcovering.title}.jpg") }%> and asset_path works fine here.
there other controllers , views in app, assets work fine.
i precompiled assets by
rails_env=production bundle exec rake assets:precompile and upload public assets production server.
where wrong?
upd:
changed #{@catalog.title} = "caesar" #{@catalog.slug} = "caesar" , works now. mystery?
Comments
Post a Comment