Class: Users::Model::UserStatus

Inherits:
Sequel::Model show all
Defined in:
lib/zen/package/users/lib/users/model/user_status.rb

Overview

Model used for user statuses such as "Open" and "Unconfirmed".

Since:

Class Method Summary (collapse)

Methods inherited from Sequel::Model

pk_hash

Class Method Details

Returns a hash where the keys are the IDs of the various statuses and the values the translations.

Returns:

  • (Hash)

Since:

  • 03-11-2011



16
17
18
19
20
21
22
23
24
# File 'lib/zen/package/users/lib/users/model/user_status.rb', line 16

def self.dropdown
  hash = {}

  select(:id, :name).each do |row|
    hash[row.id] = lang("users.special.status_hash.#{row.name}")
  end

  return hash
end