diff --git a/app/admin/admin_users.rb b/app/admin/admin_users.rb index c09dc1804..fd15aa33d 100644 --- a/app/admin/admin_users.rb +++ b/app/admin/admin_users.rb @@ -3,7 +3,7 @@ ActiveAdmin.register AdminUser do controller do def update_resource(object, attributes) - update_method = attributes.first[:password].present? ? :update_attributes : :update_without_password + update_method = attributes.first[:password].present? ? :update : :update_without_password object.send(update_method, *attributes) end end diff --git a/app/admin/users.rb b/app/admin/users.rb index 781ef046c..59a235b99 100644 --- a/app/admin/users.rb +++ b/app/admin/users.rb @@ -3,7 +3,7 @@ ActiveAdmin.register User do controller do def update_resource(object, attributes) - update_method = attributes.first[:password].present? ? :update_attributes : :update_without_password + update_method = attributes.first[:password].present? ? :update : :update_without_password object.send(update_method, *attributes) end end diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 27ecb39e9..7472d46f8 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -31,7 +31,7 @@ <%= summary_list.row do |row| row.key { 'Organisation' } - row.value { current_user.organisation } + row.value { current_user.organisation.name } row.action() end %>