Sha256: 2a2acb227d969bc25762ce6b58791f7e7ba7418153668804dd303a2f3b65ad3d
Contents?: true
Size: 585 Bytes
Versions: 346
Compression:
Stored size: 585 Bytes
Contents
module ForestLiana class DeviseController < ForestLiana::ApplicationController def change_password resource = SchemaUtils.find_model_from_collection_name( params['data']['attributes']['collection_name']) user = resource.find(params['data']['attributes']['ids'].first) user.password = params['data']['attributes']['values']['New password'] user.save if user.valid? head :no_content else render status: 400, json: { error: user.errors.try(:messages).try(:[], :password) } end end end end
Version data entries
346 entries across 346 versions & 1 rubygems