After we have processed the requested user changes, redirect back
to the list so that the resulting page is reloadable without getting
resubmission warnings from the browser.
User.update_all("status = 'confirmed'", :id => ids) if params[:confirm]
User.update_all("status = 'deleted'", :id => ids) if params[:hide]
User.update_all("status = 'confirmed'", :id => ids) if params[:confirm]
User.update_all("status = 'deleted'", :id => ids) if params[:hide]
- end
-
- conditions = Hash.new
- conditions[:status] = params[:status] if params[:status]
- conditions[:creation_ip] = params[:ip] if params[:ip]
- @user_pages, @users = paginate(:users,
- :conditions => conditions,
- :order => :id,
- :per_page => 50)
+ redirect_to url_for(:status => params[:status], :ip => params[:ip], :page => params[:page])
+ else
+ conditions = Hash.new
+ conditions[:status] = params[:status] if params[:status]
+ conditions[:creation_ip] = params[:ip] if params[:ip]
+
+ @user_pages, @users = paginate(:users,
+ :conditions => conditions,
+ :order => :id,
+ :per_page => 50)
+ end