Created
April 17, 2013 01:08
-
-
Save granolocks/5400989 to your computer and use it in GitHub Desktop.
pseudo code
This file contains hidden or 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 AppConfig < ActiveRecord::Base # Or whatever, its a model | |
| attr_accessible :homepage_template, :connection_password, :i_dunno_whatever | |
| # bear with me, its all pseudo code | |
| validates :homepage_template, :presence => true, :inclusion => { :in => MagicalTemplateHelper.homepage_templates } | |
| validates_presence_of :connection_password | |
| # settings for arbitrary shit we need to set | |
| # these are way hard to validate | |
| # and require a lot of conditional b/s | |
| # for the application to take them seriously | |
| # in terms of behavior | |
| has_many :settings | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment