zammad/app/controllers/getting_started_controller.rb
2012-08-02 12:06:26 +02:00

21 lines
No EOL
398 B
Ruby

class GettingStartedController < ApplicationController
def index
# check if first user already exists
master_user = 0
count = User.all.count()
if count <= 2
master_user = 1
end
# get all groups
@groups = Group.where( :active => true )
# return result
render :json => {
:master_user => master_user,
:groups => @groups,
}
end
end