Thanks! So I renamed /views/background/randomize.html.erb to /views/background/_randomize.html.erb and changed the method name in the background controller to _randomize as well. I put <%= render :partial => "background/_randomize" %> in application.html.erb.
Some things work, some things don't. So my randomize method simply sets @swf_bg to a random file in the public folder and then I put <%= @swf_bg %> in the _randomize.html.erb view. This is displayed properly when I go to /background/_randomize.html.erb, but when I go to the index of my site it's not including the @swf_bg variable that displays correctly when I go to /background/_randomize
it's including the code from _randomize.hml.erb in my main page like: <embed src="" /> instead of <embed src="/random/swf/file.swf" />, but when I visit /background/_randomize in my browser it works fine.
2014年4月27日日曜日 15時59分57秒 UTC-5 mike2r: