search for: get_next_imag

Displaying 1 result from an estimated 1 matches for "get_next_imag".

Did you mean: get_next_image
2010 May 03
7
rendering images dynamically
...@image = image render :update do |page| page.insert_html :bottom, ''images-div'', :partial => ''images'' end end In my query model, I have: def load_images! &block for(some_loop_that_gets_one_image_at_a_time) do image = get_next_image block.call(image) end end In the _images.html.erb, I have: <%=image_tag @image.url %> The problem is that with this approach, I get a DoubleRenderError, and I think this is because render is being called multiple times in the block call within the loop. What is the best way to...