Class: UUCounter::TracksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/uu_counter/tracks_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#fill_cookie, #get_cookie, #get_fullpath, #set_cookie

Instance Method Details

#createObject



5
6
7
8
9
10
11
# File 'app/controllers/uu_counter/tracks_controller.rb', line 5

def create
    uuid   = get_cookie
    path   = get_fullpath
    track  = Track.new(uuid: uuid, path: path)
    result = track.record
    render json: result
end