Sha256: 101837f856da81418becd193f944f1d06e0f0b121c4e7f62dffc513fc388c4dd

Contents?: true

Size: 371 Bytes

Versions: 2

Compression:

Stored size: 371 Bytes

Contents

class MetroArea < ActiveRecord::Base
  has_many :users
  belongs_to :state
  belongs_to :country

  attr_accessible :name, :state, :country_id, :state_id

  #validates_presence_of :state, :if => Proc.new { |user| user.country.eql?(Country.get(:us)) }
  validates_presence_of :country_id
  validates_presence_of :name

	acts_as_commentable

  def to_s
    name
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
community_engine-2.3.1 app/models/metro_area.rb
community_engine-2.3.0 app/models/metro_area.rb