blob: a1ee3df5fe195acde45459d45c9cdec3347ba1f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
class UserAgentDetailService
attr_accessor :spammable, :request
def initialize(spammable, request)
@spammable, @request = spammable, request
end
def create
return unless request
spammable.create_user_agent_detail(user_agent: request.env['HTTP_USER_AGENT'], ip_address: request.env['action_dispatch.remote_ip'].to_s)
end
end
|