Remove CurrentUser.ip_addr.
Remove the `CurrentUser.ip_addr` global variable and replace it with `request.remote_ip`. Before we had to track the current user's IP in a global variable so that when we edited a post for example, we could pass down the user's IP to the model and save it in the post_versions table. Now that we now longer save IPs in version tables, we don't need a global variable to get access to the current user's IP outside of controllers.
This commit is contained in:
@@ -184,7 +184,7 @@ class BulkUpdateRequestProcessor
|
||||
|
||||
# Process the bulk update request immediately.
|
||||
def process!
|
||||
CurrentUser.scoped(User.system, "127.0.0.1") do
|
||||
CurrentUser.scoped(User.system) do
|
||||
commands.map do |command, *args|
|
||||
case command
|
||||
when :create_alias
|
||||
|
||||
Reference in New Issue
Block a user