lib/authoreyes/helpers/in_controller.rb in authoreyes-0.2.3 vs lib/authoreyes/helpers/in_controller.rb in authoreyes-0.2.4
- old
+ new
@@ -36,10 +36,10 @@
end
ActionController::Metal.send(:define_method, :authorization_object) do
if params[:id].present?
begin
- controller_name.singularize.camelcase.capitalize.constantize.find(params[:id])
+ controller_name.singularize.camelcase.constantize.find(params[:id])
rescue NameError
logger.warn '[Authoreyes] Could not interpolate object!'
end
end
end