Module: CASino::ModelConcern::BrowserInfo

Extended by:
ActiveSupport::Concern
Included in:
LoginAttempt, TicketGrantingTicket
Defined in:
app/models/casino/model_concern/browser_info.rb

Instance Method Summary collapse

Instance Method Details

#browser_infoObject


4
5
6
7
8
9
10
11
12
13
# File 'app/models/casino/model_concern/browser_info.rb', line 4

def browser_info
  unless self.user_agent.blank?
    user_agent = UserAgent.parse(self.user_agent)
    if user_agent.platform.nil?
      "#{user_agent.browser}"
    else
      "#{user_agent.browser} (#{user_agent.platform})"
    end
  end
end