search for: favorite_food

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

2006 Jan 17
5
Hash.new{|h,k| h[k] = ""} ... but for views?
...ot yet been associated with that key I receive an empty string. I would love to do something similar in my partials so that I wouldn''t have to worry about passing in every variable that is referenced. For example, if I have a partial ''_foo.rhtml'' as follows: <%= favorite_food %> <%= favorite_color %> ... and I attempt to render it with a call of: <%= render(:partial => ''foo'', :locals => {:favorite_food => "Anything but natto."}) %> ... then I''ll be scolded since I didn''t provide a...