In the ruby ββon the guide rails there is a section 5.3 Using Proc with: if and: if discussed Using Proc with: if and: if in the check helper. He gives the following example:
class Account < ActiveRecord::Base validates_confirmation_of :password, :unless => Proc.new { |a| a.password.blank? } end
Does this parameter a in Proc refer to the current instance of the account? Can I understand this ("a") as a reference to the current instance of the account?
- dot :password and a.password in the same?
source share