Fix all the trailing whitespace

This commit is contained in:
Jakub Arnold
2013-02-07 16:45:24 +01:00
parent 1839614bcc
commit 61654ab8f0
230 changed files with 1165 additions and 1165 deletions

View File

@ -2,13 +2,13 @@ require 'ipaddr'
class View < ActiveRecord::Base
belongs_to :parent, polymorphic: true
belongs_to :parent, polymorphic: true
belongs_to :user
validates_presence_of :parent_type, :parent_id, :ip, :viewed_at
# TODO: This could happen asyncronously
def self.create_for(parent, ip, user=nil)
# Only store a view once per day per thing per user per ip
redis_key = "view:#{parent.class.name}:#{parent.id}:#{Date.today.to_s}"
if user.present?