4 ms·
FYI your second example isn't actually valid ruby. You need to either wrap the arg for raise in parens: user = db.query(id) || raise("UserNotFound") Or us
by toomanybeersies 4y ago
FYI your second example isn't actually valid ruby. You need to either wrap the arg for raise in parens:
user = db.query(id) || raise("UserNotFound")
Or use the `or` keyword:
user = db.query(id) or raise "UserNotFound"
- JamesSwift 4y agoAh, thank you. I knew about the issue, but I actually changed it from an initial `or` because I had them mixed up. Instead of changing the boolean rules, they should definitely address the different precedence rules for boolean operators : )