diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-27 12:22:29 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-27 12:22:29 +0100 |
commit | 67c1a0a951403a546250ea860a3e3d199cae2fce (patch) | |
tree | f86ec6cedf081a1a57005eca1661e9bead34e4de /db/migrate/20130224081700_groups_to_user_groups_in_routes.rb | |
parent | 5d8ce5f4775ac8bc5f523964e6e36f63ff3c4683 (diff) | |
parent | 211f558a86ae30cdd5b392ab1376e1393f97e22c (diff) |
Merge branch 'develop'5.1-beta6
Diffstat (limited to 'db/migrate/20130224081700_groups_to_user_groups_in_routes.rb')
-rw-r--r-- | db/migrate/20130224081700_groups_to_user_groups_in_routes.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20130224081700_groups_to_user_groups_in_routes.rb b/db/migrate/20130224081700_groups_to_user_groups_in_routes.rb new file mode 100644 index 0000000..5e03cfa --- /dev/null +++ b/db/migrate/20130224081700_groups_to_user_groups_in_routes.rb @@ -0,0 +1,19 @@ +class GroupsToUserGroupsInRoutes < ActiveRecord::Migration + def up + RouteElement.where(:var_in => 'val:auth_account.owner.groups').each do |route_element| + route_element.update_attributes(:var_in => 'val:auth_account.owner.user_groups') + end + RouteElement.where(:var_in => 'val:account.owner.groups').each do |route_element| + route_element.update_attributes(:var_in => 'val:account.owner.user_groups') + end + end + + def down + RouteElement.where(:var_in => 'val:auth_account.owner.user_groups').each do |route_element| + route_element.update_attributes(:var_in => 'val:auth_account.owner.groups') + end + RouteElement.where(:var_in => 'val:account.owner.user_groups').each do |route_element| + route_element.update_attributes(:var_in => 'val:account.owner.groups') + end + end +end |