There are two ways that I know that you can fetch results in Rails through AR, here are two example queries that return the same results but make different SQL queries.
A)
where("created_at < ? and created_at > ?", week1, week2)
B)
where(:created_at => week1..week2)
The second one (besides being nicer looking, IMHO) also creates a BETWEEN
type SQL query, while the first one is pretty much self explanatory.
Which one is better performing, or better for any other reason besides style?