Everybody knows that you can retrieve an ActiveRecord object like this:
user = User.find(41)
=> #<User id: 41>
But did you know that you can pass multiple ids to the find method?
user = User.find(1, 2, 5)
=> [#<User id: 1>, #<User id: 2>, #<User id: 5>]
Principle of least surprise.
11 notes 0 comments (via rubyloveinfo)
You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.