class SearchingController < ApplicationController
include ActionView::Helpers::TextHelper
def index
@masters = User.search_by_full_name(params[:full_name]).where(master: :true)
@courses = Course.searching_courses(params[:course_title])
@masters = truncate(@masters, separator: '[')
end
end
这是我的控制器。他返回错误
ActiveRecord::Relation [] 的未定义方法“截断”
怎么解决?谢谢!