Project

General

Profile

« Previous | Next » 

Revision 39af9530

Added by Ohad Levy almost 12 years ago

  • ID 39af9530a339e4b82a18be8954f45321325c44cb

fixes #1792 - error on json output of usergroups

View differences:

app/models/usergroup.rb
group_list.sort.uniq
end
def as_json(options={})
super({:only => [:name, :id]})
end
protected
# Recurses down the tree of usergroups and finds the users
# [+group_list+]: Array of Usergroups that have already been processed
......
errors.add :name, "is already used by a user account" if User.where(:login => name).first
end
def as_json(options={})
super({:only => [:name, :id]})
end
end

Also available in: Unified diff