Class: Account
- Inherits:
-
Object
- Object
- Account
- Includes:
- MongoMapper::Document
- Defined in:
- lib/rad/models/account.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#domains_as_string ⇒ Object
Form helpers.
- #domains_as_string=(str) ⇒ Object
- #select(account_name, space_name = 'default') ⇒ Object
Class Method Details
.current ⇒ Object
67 68 69 |
# File 'lib/rad/models/account.rb', line 67 def self.current Thread.current['current_account'].must_be.defined end |
.current=(account) ⇒ Object
63 64 65 |
# File 'lib/rad/models/account.rb', line 63 def self.current= account Thread.current['current_account'] = account end |
.current? ⇒ Boolean
71 72 73 |
# File 'lib/rad/models/account.rb', line 71 def self.current? !!Thread.current['current_account'] end |
Instance Method Details
#domains_as_string ⇒ Object
Form helpers
38 39 40 |
# File 'lib/rad/models/account.rb', line 38 def domains_as_string domains.join("\n") end |
#domains_as_string=(str) ⇒ Object
42 43 44 |
# File 'lib/rad/models/account.rb', line 42 def domains_as_string= str self.domains = str.split("\n") unless str.nil? end |