Tutorial :Ruby on Rails: Including multiple instance variables in partials


So... I know about the :locals => { :var1 => @rawr, :var2 => @hello } syntax for partials
but is there a way for me to pass both @rawr and @hello to the partial, so that i don't need to use var1 and var2?


You can do :locals => { :rawr => @rawr, :hello => @hello } and then the variables will be available within the partial as rawr and hello.


You know, you could just use @rawr and @hello ... and NOT pass any variables.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »