role_authorization 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,13 +98,11 @@ module RoleAuthorization
|
|
98
98
|
end
|
99
99
|
|
100
100
|
if hash
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
klass
|
105
|
-
end
|
101
|
+
klass = (hash[:controller].camelize + "Controller").constantize.new
|
102
|
+
klass.params = hash
|
103
|
+
klass.instance_variable_set(:@current_user, current_user)
|
106
104
|
|
107
|
-
return authorized_action?(
|
105
|
+
return authorized_action?(klass, hash[:controller], hash[:action].to_sym, hash[:id])
|
108
106
|
end
|
109
107
|
rescue Exception => e
|
110
108
|
Rails.logger.error e.inspect
|