class Internship < ActiveRecord::Base
  # attr_accessible :title, :body
  # Associations

  belongs_to :country

  # Will paginate uses this method
  # to know how many rows to show
  #
  def self.per_page
    50
  end
  
  # Search
  searchable do
    text :name, :stored => true
    text :descripton_for_search, :stored => true
    integer :country_id, :stored => true
  end
  
  def descripton_for_search
    [
      name, 
      content
    ].join(' / ')
  end

end
