def get_last_readed_user_page
      return nil if current_user.blank?
      return nil unless params[:page].blank?
      user_last_page = nil

      latest_readed_post = LogReadMark.where(user_id: current_user.id, topic_id: @topic.id).first
      return nil unless latest_readed_post

      page_groups = @topic.posts.pluck(:id).in_groups_of(Post::PER_PAGE)
      page_groups.each_with_index { |group, page| user_last_page = page and break if group.include?(latest_readed_post.post_id) }
      user_last_page +=1 if user_last_page

      user_last_page
    end
def get_last_readed_user_page
      return nil if current_user.blank?
      return nil unless params[:page].blank?
      user_last_page = nil

      latest_readed_post = LogReadMark.where(user_id: current_user.id, topic_id: @topic.id).first
      return nil unless latest_readed_post

      page_groups = @topic.posts.pluck(:id).in_groups_of(Post::PER_PAGE)
      page_groups.each_with_index { |group, page| user_last_page = page and break if group.include?(latest_readed_post.post_id) }
      user_last_page +=1 if user_last_page

      user_last_page
    end
TODO development in progress