I want to pass a local variable that contains the origin on a specific page, this variable contains only a character with a value.
When I use this code, it works fine, the origin variable is available in partial:
render :partial => "products", :collection => @products, :locals => {:origin => :gallery}
But when I use this code, the source is not set and is not available in partial:
render @products, :locals => {:origin => :gallery}
What is the difference? The second line of code does not display partial, how is the first line?
ruby-on-rails-3 renderpartial partials
SteenhouwerD Apr 03 2018-12-12T00: 00Z
source share