diff options
| author | Zakaria BOUZIANE | 2015-03-09 14:01:10 +0100 | 
|---|---|---|
| committer | Zakaria BOUZIANE | 2015-03-09 14:01:10 +0100 | 
| commit | 0d5adf2fad5c0ddd8efc1eca9dc6d8e9c48b049d (patch) | |
| tree | 36e3d37edd325d59b6056c738305d5d60f74beee /app/models/organisation.rb | |
| parent | f0456f7334b8fb4442a51bb370fdc0c5a3ea2cd0 (diff) | |
| download | chouette-core-0d5adf2fad5c0ddd8efc1eca9dc6d8e9c48b049d.tar.bz2 | |
Prepare merging V2_5 into V3
Diffstat (limited to 'app/models/organisation.rb')
| -rw-r--r-- | app/models/organisation.rb | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/organisation.rb b/app/models/organisation.rb index f4b2e35f8..8fafa56a0 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -1,7 +1,18 @@  # -*- coding: utf-8 -*-  class Organisation < ActiveRecord::Base +  include DataFormatEnumerations +    has_many :users, :dependent => :destroy    has_many :referentials, :dependent => :destroy +  has_many :rule_parameter_sets, :dependent => :destroy    validates :name, :presence => true, :uniqueness => true + +  after_create :add_rule_parameter_set + +  #attr_accessible :data_format, :name +   +  def add_rule_parameter_set +    RuleParameterSet.default_for_all_modes( self).save +  end  end  | 
