Be Explicit, B-E-Explicit
Posted October 2nd, 2006 in Programming / Comments OffTags: Programming, Ruby on Rails
Ruby’s beauty is often attributed to its terseness. However, there are times when you need to be really explicit in order to coax it to do your bidding. For example, a Rails form helper needs a bunch of parantheses and curly braces in order to be a named element. Which makes sense, as :id
can represent a Rails (ActiveRecord) object ID or a DOM element ID. The Ruby punctuation removes such ambiguity.