首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

批量剔除记录

2012-09-08 
批量删除记录workhors/index.html.erb??worhours.js.coffee?def destroy_multipleif params[:workhour_ids

批量删除记录

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

热点排行