Joined November 2011
·
Posted to
Edit user without password in active admin
over 1 year
ago
thanks for sharing!
there is also nice solution: http://stackoverflow.com/a/11676957/1171144
controller do
def update_resource object, attributes
attributes.each do |attr|
if attr[:password].blank? and attr[:password_confirmation].blank?
attr.delete :password
attr.delete :password_confirmation
end
end
object.send :update_attributes, *attributes
end
end
Achievements
60 Karma
718 Total ProTip Views

Mongoose 3
Have at least three original repos where Ruby is the dominant language

Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos

Kona
Have at least one original repo where CoffeeScript is the dominant language

Charity
Fork and commit to someone's open source project in need

Mongoose
Have at least one original repo where Ruby is the dominant language
setopt nocorrectall; works fine