Explicitly naming a partials local collection variable name
# From the little-but-useful department comes a new addition to Rails that lets you explicitly name the local 
# variable exposed to a partial template when using a collection partial. So, for instance, in this statement:

render :partial => 'employees', :collection => @workers, :as => :person

# each element of the workers collection will be exposed as person within the employees template. 
# No longer are you hostage to your template name.
Language Ruby / Tagged with rails