app/models/fae/change.rb in fae-rails-1.3.1 vs app/models/fae/change.rb in fae-rails-1.4.0
- old
+ new
@@ -1,15 +1,17 @@
module Fae
class Change < ActiveRecord::Base
+ include Fae::Sortable
+ include Fae::ChangeConcern
belongs_to :user
belongs_to :changeable, polymorphic: true
serialize :updated_attributes
- # writing current_user to thread for thread safety
class << self
+ # writing current_user to thread for thread safety
def current_user=(user)
Thread.current[:current_user] = user
end
def current_user
@@ -43,8 +45,9 @@
# apply conditions and search from above to our scope
order(id: :desc)
.includes(:user).references(:user)
.where(date_scope).where(conditions).where(search)
end
+
end
end
end