Class: Users::Model::UserStatus
- Inherits:
-
Sequel::Model
- Object
- Sequel::Model
- Users::Model::UserStatus
- Defined in:
- lib/zen/package/users/lib/users/model/user_status.rb
Overview
Model used for user statuses such as "Open" and "Unconfirmed".
Class Method Summary (collapse)
-
+ (Hash) dropdown
Returns a hash where the keys are the IDs of the various statuses and the values the translations.
Methods inherited from Sequel::Model
Class Method Details
+ (Hash) dropdown
Returns a hash where the keys are the IDs of the various statuses and the values the translations.
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 |