diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2013-08-13 23:18:50 +0200 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2014-05-07 02:58:28 +0200 |
commit | ce1773461b71a40afb406f4148b32aad11b52a57 (patch) | |
tree | 88f779715658a74c2ac8bb8972e7879c5b10e1b3 /db | |
parent | 561be6974dc030309a2165726c5b4ff3f0afba2d (diff) | |
download | ecs2-ce1773461b71a40afb406f4148b32aad11b52a57.tar.gz ecs2-ce1773461b71a40afb406f4148b32aad11b52a57.zip |
Turn on/off events by participants.
Up to now events could be turned on and off by resources. To turn on
events you still have to do it by resource but have additionally
the possibility to control it by participant. Only if both switches are
on, the participant will get events generated through the resource.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20130813144307_add_events_to_participant.rb | 13 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/db/migrate/20130813144307_add_events_to_participant.rb b/db/migrate/20130813144307_add_events_to_participant.rb new file mode 100644 index 0000000..a1dd85f --- /dev/null +++ b/db/migrate/20130813144307_add_events_to_participant.rb @@ -0,0 +1,13 @@ +class AddEventsToParticipant < ActiveRecord::Migration + def self.up + add_column :participants, :events_, :boolean, :default => true + Participant.all.each do |p| + p.events_= ECS_CONFIG["participants"]["allow_events"] + p.save! + end + end + + def self.down + remove_column :participants, :events_ + end +end diff --git a/db/schema.rb b/db/schema.rb index a8d2fe1..74f16be 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,7 +9,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20110303145153) do +ActiveRecord::Schema.define(:version => 20130813144307) do create_table "auths", :force => true do |t| t.string "one_touch_hash" @@ -99,6 +99,7 @@ ActiveRecord::Schema.define(:version => 20110303145153) do t.datetime "created_at" t.datetime "updated_at" t.boolean "community_selfrouting", :default => false + t.boolean "events_", :default => true end create_table "ressources", :force => true do |t| |