Sha256: 1871f2fe0c278114b40b49913755d3c2af6fbd098337a635c862373683e1fb94

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

# Indicates that a specific feature has been rolled out to an individual
# Table for storing flaggable flag-ins, group flag-ins, or percentage-based
# flag-ins.
class Detour::Flag < ActiveRecord::Base
  self.table_name = :detour_flags

  belongs_to :feature

  validates_presence_of :feature
  validates_presence_of :flaggable_type

  attr_accessible :flaggable_type

  private

  def flag_type
    self.class.to_s.underscore.gsub("detour/", "").split("_")[0..-2].join("_")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
detour-0.0.11 app/models/detour/flag.rb
detour-0.0.10 app/models/detour/flag.rb
detour-0.0.9 app/models/detour/flag.rb
detour-0.0.7 app/models/detour/flag.rb
detour-0.0.6 app/models/detour/flag.rb
detour-0.0.5 app/models/detour/flag.rb
detour-0.0.3 app/models/detour/flag.rb
detour-0.0.2 app/models/detour/flag.rb