diff options
Diffstat (limited to 'app/services/user_agent_detail_service.rb')
-rw-r--r-- | app/services/user_agent_detail_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/user_agent_detail_service.rb b/app/services/user_agent_detail_service.rb index dd995955be3..c07e2ca12a6 100644 --- a/app/services/user_agent_detail_service.rb +++ b/app/services/user_agent_detail_service.rb @@ -1,12 +1,12 @@ class UserAgentDetailService - attr_accessor :subject, :request + attr_accessor :spammable, :request - def initialize(subject, request) - @subject, @request = subject, request + def initialize(spammable, request) + @spammable, @request = spammable, request end def create return unless request - subject.create_user_agent_detail(user_agent: request.env['HTTP_USER_AGENT'], ip_address: request.env['action_dispatch.remote_ip'].to_s) + spammable.create_user_agent_detail(user_agent: request.env['HTTP_USER_AGENT'], ip_address: request.env['action_dispatch.remote_ip'].to_s) end end |