Class: GraphStarter::View

Inherits:
Object
  • Object
show all
Includes:
Neo4j::ActiveRel
Defined in:
app/models/graph_starter/view.rb

Instance Method Summary collapse

Instance Method Details

#increment_destination_view_countObject



26
27
28
29
30
# File 'app/models/graph_starter/view.rb', line 26

def increment_destination_view_count
  to_node.view_count ||= 0
  to_node.view_count += 1
  to_node.save
end

#set_viewed_atObject



20
21
22
# File 'app/models/graph_starter/view.rb', line 20

def set_viewed_at
  self.viewed_at ||= Time.now
end