block.rb 311 Bytes
class Block < ActiveRecord::Base
  belongs_to :box

  #<tt>position</tt> codl not be nil and must be an integer
  validates_numericality_of :position, :only_integer => true , :message => _('%{fn} must be composed only of integers')

  # A block must be associated to a box
  validates_presence_of :box_id 

end