Class: UserThreadView

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/user_thread_view.rb

Class Method Summary collapse

Class Method Details

.record(user, post) ⇒ Object



5
6
7
8
# File 'app/models/user_thread_view.rb', line 5

def self.record(user, post)
  return unless user
  UserThreadView.connection.execute("replace into user_thread_views (system_id, topic_thread_id, user_id, seen_post_id) values (#{post.system_id}, #{post.topic_thread_id}, #{user.id}, #{post.id});")
end