Add deleted_at for User

Do not remove the user from the database. Mark as deleted instead.
This commit is contained in:
Patrick Gansterer 2016-03-04 19:03:52 +01:00
parent b30b4e46d8
commit b05ac2ab64
15 changed files with 82 additions and 12 deletions

View file

@ -1,7 +1,7 @@
class Foodcoop::UsersController < ApplicationController
def index
@users = User.natural_order
@users = User.undeleted.natural_order
# if somebody uses the search field:
@users = @users.natural_search(params[:user_name]) unless params[:user_name].blank?