mod/01_history/set/all/content_history.rb in card-1.18.1 vs mod/01_history/set/all/content_history.rb in card-1.18.2
- old
+ new
@@ -104,19 +104,20 @@
def last_actor
last_act.actor
end
def last_act
- if (action = last_action)
- last_act_on_self = acts.last
- if last_act_on_self &&
- (action.act == last_act_on_self ||
- last_act_on_self.acted_at > action.act.acted_at)
- last_act_on_self
- else
- action.act
+ @last_act ||=
+ if (action = last_action)
+ last_act_on_self = acts.last
+ if last_act_on_self &&
+ (action.act == last_act_on_self ||
+ last_act_on_self.acted_at > action.act.acted_at)
+ last_act_on_self
+ else
+ action.act
+ end
end
- end
end
def acted_at
last_act.acted_at
end