I want to do custom model validation, and after a bit of googling and
looking at the api, i found out that on Rails 3, you can use the
validate method by passing it a method symbol or a block.
errors.add(:base, “Must be friends to leave a comment”) unless
Now I’m using rails 2.3.8 and I couldn’t find this documented on the 2.3
api docs, yet when I use it on my code, it just magically works whether
i pass it a block or symbol. I tried looking at the source, but the only
thing i can see is a empty validate method that is left for user to
override. Any ideas on why it just works?