The attribute
method is used to define a list of attributes and any of those attribute's associated validation parameters. The syntax for the attribute
method is as follows:
attribute :attribute_name :validation_parameter => value, :validation_parameter => value
where attribute
must have an attribute name and zero (or more) validation parameters.