This commit is contained in:
yanxd 2013-12-26 08:43:16 +08:00
parent 605d7ec565
commit a01123c5bf
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class WordsController < ApplicationController
# @message_count = a_message.count
end
end
@jours = @user.journals_for_messages.reverse
@jours = @user.journals_for_messages.where('m_parent_id IS NULL').reverse
@limit = 10
@feedback_count = @jours.count
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']

View File

@ -27,7 +27,7 @@ class JournalsForMessage < ActiveRecord::Base
after_create :reset_counters!
after_destroy :reset_counters!
default_scope { where('m_parent_id IS NULL') }
# default_scope { where('m_parent_id IS NULL') }
def self.delete_message(message_id)
self.delete_all "id = #{message_id}"