diff --git a/app/controllers/principal_roles_controller.rb b/app/controllers/principal_roles_controller.rb index 588ec5cc0f..dca12eb10b 100644 --- a/app/controllers/principal_roles_controller.rb +++ b/app/controllers/principal_roles_controller.rb @@ -8,7 +8,7 @@ class PrincipalRolesController < ApplicationController format.js do render(:update) do |page| principal_roles.each do |role| - page.remove "principal_role_option_#{role.role.id}" + page.remove "principal_role_option_#{role.role_id}" page.insert_html :top, 'table_principal_roles_body', :partial => "principal_roles/show_table_row", :locals => {:principal_role => role} @@ -26,7 +26,7 @@ class PrincipalRolesController < ApplicationController format.js do render(:update) do |page| if @principal_role.valid? - page.replace "principal_role-#{@principal_role.role_id}", + page.replace "principal_role-#{@principal_role.id}", :partial => "principal_roles/show_table_row", :locals => {:principal_role => @principal_role} else diff --git a/app/views/principal_roles/_show_table_row.html.erb b/app/views/principal_roles/_show_table_row.html.erb index 336c9410df..25cf1c3a5a 100644 --- a/app/views/principal_roles/_show_table_row.html.erb +++ b/app/views/principal_roles/_show_table_row.html.erb @@ -1,5 +1,5 @@