标签:binding hash ram bsp render style blog ext log
def search @videos = Video.where("videoid LIKE ? or title LIKE ?", "%#{params[:q]}%", "%#{params[:q]}%") render :index end
使用 hash 的写法
def search @videos = Video.where("videoid LIKE :q or title LIKE :q", q: "%#{params[:q]}%") render :index end
标签:binding hash ram bsp render style blog ext log
原文地址:http://www.cnblogs.com/iwangzheng/p/6164095.html