diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-24 14:09:31 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-24 14:09:31 +0100 |
commit | e024c99b6ffeb725cf73ebf8b7b55957f36772f5 (patch) | |
tree | 36ce89c477055f33245a62f8455a4af5eb27a8de /db/migrate | |
parent | ea3df5a7eb079982a8fcda3df572a0d1433b7f52 (diff) |
A new user becomes a member of default UserGroups.
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20130124125238_add_default_user_groups_for_new_users.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb new file mode 100644 index 0000000..d2700d6 --- /dev/null +++ b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb @@ -0,0 +1,9 @@ +class AddDefaultUserGroupsForNewUsers < ActiveRecord::Migration + def up + GsParameter.create(:name => 'DEFAULT_USER_GROUPS_IDS', :section => 'New user defaults', :value => "---\n- 3\n", :class_type => 'YAML', :description => 'Default user group ids for a new user.') + end + + def down + GsParameter.where(:name => 'DEFAULT_USER_GROUPS_IDS').destroy_all + end +end |