wiking.patch
plugins/wiking/app/views/wiking/_mentions.html.erb 2015-11-09 23:18:57.472388248 +0000 | ||
---|---|---|
1 | 1 |
<% count = 0 %> |
2 | 2 |
<% mentions = [] %> |
3 |
<% Mention.find(:all, |
|
4 |
:conditions => { :mentioned_id => @user.id }, |
|
5 |
:order => "created_on DESC").each do |mention| |
|
3 |
<% Mention.where(mentioned_id: @user.id).order(created_on: :desc).find_each do |mention| |
|
6 | 4 |
if mention.title.present? && (!mention.mentioning.respond_to?(:visible?) || mention.mentioning.visible?) |
7 | 5 |
mentions << mention |
8 | 6 |
count += 1 |
9 |
-- plugins/wiking/app/controllers/mentions_controller.rb.orig 2015-11-09 23:03:17.238304725 +0000
|
|
7 |
++ plugins/wiking/app/controllers/mentions_controller.rb 2015-11-09 23:17:01.766901352 +0000
|
|
... | ... | |
18 | 18 |
@next_offset = 0 |
19 | 19 |
end |
20 | 20 |
mentions = [] |
21 |
Mention.find(:all, options.merge( |
|
22 |
:conditions => { :mentioned_id => @user.id }, |
|
23 |
:order => "created_on DESC")).each do |mention| |
|
21 |
Mention.where(mentioned_id: @user.id).order(created_on: :desc).offset(@offset).limit(10).find_each do |mention| |
|
24 | 22 |
if mention.title.present? && (!mention.mentioning.respond_to?(:visible?) || mention.mentioning.visible?) |
25 | 23 |
mentions << mention |
26 | 24 |
count += 1 |
27 |
-- plugins/wiking/app/views/users/_mentions.html.erb.orig 2015-11-09 23:21:20.272105701 +0000
|
|
25 |
++ plugins/wiking/app/views/users/_mentions.html.erb 2015-11-09 23:21:56.401073599 +0000
|
|
... | ... | |
5 | 5 |
</div> |
6 | 6 | |
7 | 7 |
<p> |
8 |
<%= l(:label_total_number_of_mentions)%>: <%= Mention.count(:conditions => { :mentioned_id => @user.id }) %>
|
|
8 |
<%= l(:label_total_number_of_mentions)%>: <%= Mention.where(mentioned_id: @user.id ).count %>
|
|
9 | 9 |
</p> |
10 | 10 | |
11 | 11 |
<div id="activity"> |