Class: Hit
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Hit
- Defined in:
- lib/saw/hit.rb
Instance Method Summary collapse
Instance Method Details
#after ⇒ Object
15 16 17 |
# File 'lib/saw/hit.rb', line 15 def after Saw::Util.time_diff visit.starts_with.created_at, created_at end |
#last_hit ⇒ Object
7 8 9 |
# File 'lib/saw/hit.rb', line 7 def last_hit visit.hits.where(' hits.id < ? ', id).last end |
#next_hit ⇒ Object
11 12 13 |
# File 'lib/saw/hit.rb', line 11 def next_hit visit.hits.where(' hits.id > ? ', id).first end |
#user_visits ⇒ Object
19 20 21 |
# File 'lib/saw/hit.rb', line 19 def user_visits visit.user.visits end |