class City < ActiveRecord::Base
  attr_accessible :name, :state_id
  
  # Associations
  belongs_to :state
  has_many :food_establishments
  has_many :votation_centers
  
  # Validations
  validates :state_id, :name, :presence => true
  
  # Will paginate uses this method
  # to know how many rows to show
  #
  def self.per_page
    262
  end
  
  def full_name
    return "#{state.name} / #{name}"
  end
end
