When writing a Rails app, what common tasks can likely result in
The one I’m aware of is something like:
Model.find(:all).each do |elem|
Especially when there’s lots of elements in the Model. What other
ones are there?
Also, does Rails do caching of queries? If I’m in a view and I do:
<% if user.admin? %> …
and then later on in that same view, I have the same code again, does
that execute two queries?