blob: a72f778e22fd2560b035e0c47d5f729b673dcc93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class IpProfilesController < ApplicationController
def show
authorize! :mod_read, User
@ip = params[:id]
@user_ips = UserIp.where(ip: @ip).order(updated_at: :desc)
@bans = SubnetBan.where('specification >>= :ip', ip: @ip)
@title = "#{@ip}'s IP profile"
respond_to do |format|
format.html
format.json { render json: { ip: @ip, user_ips: @user_ips, bans: @bans } }
end
end
end
|