small medium large xlarge

28555da_pragsmall
20 Jan 2011, 22:51
David Wilbur (49 posts)

from page 368:

render(:partial => ‘article’, :object => @an_article, :locals => { :authorized_by => session[:user_name], :from_ip => request.remote_ip })

could i suggest a little more discussion about this. people are stumbling on this on various forums.

examples of issues that people are having are:

http://www.ruby-forum.com/topic/212560#new http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/712daf873c1bca8d/3d2cf64f9ef61d79?lnk=gst&q=render+%3Alocals+#3d2cf64f9ef61d79 http://stackoverflow.com/questions/4402556/rails-confused-about-syntax-for-passing-locals-to-partials

another issue seems related to what you do above a :locals that has more then one variable saying it couldn’t find the variable/method after the first entry.

also, there seem to be few examples of what to do in the partial when you do something other then the simple render.

You must be logged in to comment