ruby on rails - Partial locals are not being passed -
i'm trying pass locals partial render in rails, not getting passed.
<%=render :partial => "search_results", :locals => {:refinement => "all", :query => params[:search]}%>
the partial being rendered in view has param[:search]
in it, params[:search]
accessable inside of partial without being passed in local.
i'm trying access locals refinement , query doing params[:refinement]
, params[:query]
inside of partial, not being recognized.
you don't access them via params
- access local variable, eg. refinement
or query
.
Comments
Post a Comment