  class JamRuby::AppFeature < ActiveRecord::Base

    FEATURE_TYPES = %w(page)

    attr_accessible :feature_type, :handle, :is_enabled, :env, as: :admin

    #self.table_name = 'app_features'

    validates :feature_type, presence: true, inclusion: {in: FEATURE_TYPES}
    validates :handle, presence: true, length: {maximum: 255}
    validates :is_enabled, inclusion: {in: [true, false]}
    validates :env, presence: true, inclusion: {in: %w(production staging development)}
  end