2012-06-17 03:15:46 +02:00
|
|
|
class UsersController < ApplicationController
|
2012-06-30 21:14:35 +02:00
|
|
|
def show
|
2014-01-12 21:22:47 +01:00
|
|
|
@showing_user = User.where(:username => params[:username]).first!
|
2012-09-07 16:18:15 +02:00
|
|
|
@title = "User #{@showing_user.username}"
|
2012-06-30 21:14:35 +02:00
|
|
|
end
|
2012-07-08 02:47:13 +02:00
|
|
|
|
|
|
|
def tree
|
2012-09-07 16:18:15 +02:00
|
|
|
@title = "Users"
|
|
|
|
|
2014-01-04 09:14:41 +01:00
|
|
|
users = User.order("id DESC").to_a
|
2012-07-08 02:47:13 +02:00
|
|
|
|
2014-01-04 09:14:41 +01:00
|
|
|
@user_count = users.length
|
|
|
|
@users_by_parent = users.group_by(&:invited_by_user_id)
|
2012-07-08 02:47:13 +02:00
|
|
|
end
|
2013-02-22 21:52:22 +01:00
|
|
|
|
|
|
|
def invite
|
|
|
|
@title = "Pass Along an Invitation"
|
|
|
|
end
|
2012-06-17 03:15:46 +02:00
|
|
|
end
|