Class: Ahoy::EventsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Ahoy::EventsController
- Defined in:
- app/controllers/ahoy/events_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'app/controllers/ahoy/events_controller.rb', line 4 def create = {} if params[:time] and (time = Time.at(params[:time].to_f) rescue nil) and (1.minute.ago..Time.now).cover?(time) [:time] = time end ahoy.track params[:name], params[:properties], render json: {} end |