# File app/controllers/admin_controller.rb, line 104 def undo @change_pages, @changes = paginate :changes, :per_page => 10, :order => 'date DESC' if request.post? @s = @d = "" # @changes.each { |c| @s << c.id.to_s + " " if params[:post][c.id.to_s] == '1' } # @changes.each { |c| @d << c.id.to_s + " " } # raise @d params[:post].each { |x| Change.find(x[0].to_i).undo(session[:user_id]) if x[1] == '1' && Change.find(:first, :conditions => {:id => x[0].to_i} ) } redirect_to :action => 'undo' else render :layout => 'simple' end end