ruby - Rails 4 asset not found -


in application.rb config.assets.enabled = false

my route:

  'products/:category_id' => 'products#index', :as => 'products'   'products/:category_id/:product_id' => 'products#show', :as => 'product' 

when go first route, assets found in proper location in public folder. in second route products/:category_id/:product_id' prepended in asset route , no route matches. eg:

products/:category_id/:product_id/img/arrow-down.gif 

but localhost:3000/img/arrow-down.gif finds asset.

please put me in right path. have been searching reason hours.

addpointer:function(target, imgclass, imginfo, beforeorafter){     var pointer=document.createelement("img")     pointer.src=imginfo[0] **this line gives error     pointer.style.width=imginfo[1]+"px"     pointer.style.height=imginfo[2]+"px"     if(imgclass=="rightarrowpointer"){         pointer.style.left=target.offsetwidth-imginfo[2]-2+"px"     }     pointer.classname=imgclass     var target_firstel=target.childnodes[target.firstchild.nodetype!=1? 1 : 0] //see if first child element within span (found in sliding doors technique)     if (target_firstel && target_firstel.tagname=="span"){         target=target_firstel //arrow should added inside span instead if found     }     if (beforeorafter=="before")         target.insertbefore(pointer, target.firstchild)     else         target.appendchild(pointer) } 

note: js library, ddlevelsmenu


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -