Class: Junebug::Controllers::Users

Inherits:
R
  • Object
show all
Defined in:
lib/junebug/controllers.rb

Instance Method Summary collapse

Instance Method Details

#getObject



149
150
151
152
153
154
# File 'lib/junebug/controllers.rb', line 149

def get
  @page_title = "Users"
  #@users = User.find(:all, :order => 'username')
  @users = User.find_by_sql("SELECT users.id, username, role, count(*) AS count FROM junebug_users AS users, junebug_page_versions AS versions WHERE users.id=versions.user_id GROUP BY users.id ORDER BY count DESC")
  render :users
end