Created
December 22, 2010 21:28
-
-
Save tjschuck/752135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SupportGroup < ActiveRecord::Base | |
# Define valid language options for validations below | |
languages = %w(en es) | |
# Repeat valid languages for use outside this file with @support_group.languages | |
def languages | |
%w(en es) | |
end | |
validates :language, :inclusion => { :in => languages } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment