diff options
author | Peter Kozak <spag@golwen.net> | 2013-02-24 03:24:54 -0500 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-02-24 03:24:54 -0500 |
commit | c77dc2aaa3c5299b17c9b6d022d1e316c9d61a59 (patch) | |
tree | ffcf13a704d6544e9bcf0b5549f8ec51de5b72a8 /db/migrate | |
parent | 757fbb9de88c1b6d8ec1eff6519bd057c74892a5 (diff) |
adapt routes to user_groups
Diffstat (limited to 'db/migrate')
-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 |