app/controllers/auth/profiles_controller.rb in wordjelly-auth-1.3.7 vs app/controllers/auth/profiles_controller.rb in wordjelly-auth-1.3.8
- old
+ new
@@ -15,16 +15,15 @@
@resource_params = {}
@profile_resource = nil
@all_params = permitted_params.deep_symbolize_keys
- ## okay let's see how to switch to that user.
-
if collection = @all_params[:resource]
if Auth.configuration.auth_resources[collection.singularize.capitalize]
@resource_class = collection.singularize.capitalize.constantize
+
@resource_symbol = collection.singularize.to_sym
@resource_params = @all_params.fetch(@resource_symbol,{})
@profile_resource = @all_params[:id] ? @resource_class.find_resource(@all_params[:id],current_signed_in_resource) : @resource_class.new(@resource_params)