Module: Ahoy
- Defined in:
- app/jobs/ahoy/geocode_job.rb,
lib/ahoy.rb,
lib/ahoy/model.rb,
lib/ahoy/utils.rb,
lib/ahoy/engine.rb,
lib/ahoy/helper.rb,
lib/ahoy/tracker.rb,
lib/ahoy/version.rb,
lib/ahoy/base_store.rb,
lib/ahoy/controller.rb,
lib/ahoy/query_methods.rb,
lib/ahoy/database_store.rb,
lib/ahoy/visit_properties.rb,
app/jobs/ahoy/geocode_v2_job.rb,
lib/generators/ahoy/base_generator.rb,
app/controllers/ahoy/base_controller.rb,
lib/generators/ahoy/install_generator.rb,
lib/generators/ahoy/mongoid_generator.rb,
app/controllers/ahoy/events_controller.rb,
app/controllers/ahoy/visits_controller.rb,
lib/generators/ahoy/activerecord_generator.rb
Overview
for smooth update from Ahoy 1 -> 2
Defined Under Namespace
Modules: Controller, Generators, Helper, Model, QueryMethods, Utils Classes: BaseController, BaseStore, DatabaseStore, Engine, EventsController, GeocodeJob, GeocodeV2Job, Tracker, VisitProperties, VisitsController
Constant Summary collapse
- VERSION =
"3.0.3"
- Properties =
backward compatibility
Ahoy::QueryMethods
Class Method Summary collapse
Class Method Details
.log(message) ⇒ Object
93 94 95 |
# File 'lib/ahoy.rb', line 93 def self.log() logger.info { "[ahoy] #{}" } if logger end |
.mask_ip(ip) ⇒ Object
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/ahoy.rb', line 97 def self.mask_ip(ip) addr = IPAddr.new(ip) if addr.ipv4? # set last octet to 0 addr.mask(24).to_s else # set last 80 bits to zeros addr.mask(48).to_s end end |