读书人

批量剔除记录

发布时间: 2012-09-08 10:48:07 作者: rapoo

批量删除记录

workhors/index.html.erb

?

?

worhours.js.coffee

?

  def destroy_multiple    if params[:workhour_ids].blank?      redirect_to :back, :alert => '请选择待删除项'    else      workhours = Workhour.find params[:workhour_ids]      workhours.each do |w|        w.destroy      end      redirect_to :back, :notice => I18n.t('flash.actions.destroy.notice')    end  rescue => e    redirect_to :back, :alert => e.to_s  end

读书人网 >编程

热点推荐