批量删除记录
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