Sha256: 54d23ca8bf1d42aae8cc665a679111c56aeb842362c9b0f3c00468da0f0bdb5f
Contents?: true
Size: 529 Bytes
Versions: 3
Compression:
Stored size: 529 Bytes
Contents
module Formol class Poll::Option < ActiveRecord::Base #Security attr_protected :poll_id #Associations belongs_to :poll has_many :votes #Validations validates :poll, :presence => true validates :answer, :presence => true, :length => { :maximum => 32, :allow_blank => true } #Normalization normalize_attribute :answer, :with => [:squish, :blank] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
formol-0.0.6 | app/models/formol/poll/option.rb |
formol-0.0.5 | app/models/formol/poll/option.rb |
formol-0.0.4 | app/models/formol/poll/option.rb |