Class: ESP::User
- Inherits:
-
Resource
- Object
- ActiveResource::Base
- Resource
- ESP::User
- Defined in:
- lib/esp/resources/user.rb
Class Method Summary collapse
-
.all ⇒ ActiveResource::PaginatedCollection<ESP::User>
Return a paginated User list.
-
.create ⇒ void
Not Implemented.
-
.find(id, options = {}) ⇒ ESP::User
Find a User by id.
-
.where(clauses = {}) ⇒ ActiveResource::PaginatedCollection<ESP::User>
Return a paginated User list filtered by search parameters.
Instance Method Summary collapse
-
#destroy ⇒ void
Not Implemented.
-
#organization ⇒ ESP::Organization
The organization this user belongs to.
-
#save ⇒ void
Not Implemented.
-
#sub_organizations ⇒ ActiveResource::PaginatedCollection<ESP::SubOrganization>
The collection of sub organizations that belong to the user.
-
#teams ⇒ ActiveResource::PaginatedCollection<ESP::Team>
The collection of teams that belong to the user.
Methods included from Dirty
#changed_attributes, #original_attributes, #original_attributes=
Methods included from LoadWithOriginalAttributes
Class Method Details
.all ⇒ ActiveResource::PaginatedCollection<ESP::User>
Return a paginated User list
|
# File 'lib/esp/resources/user.rb', line 65
|
.create ⇒ void
This method returns an undefined value.
Not Implemented. You cannot create a User.
|
# File 'lib/esp/resources/user.rb', line 70
|
.find(id, options = {}) ⇒ ESP::User
Find a User by id
call-seq -> super.find(id, options = {})
|
# File 'lib/esp/resources/user.rb', line 49
|
.where(clauses = {}) ⇒ ActiveResource::PaginatedCollection<ESP::User>
Return a paginated User list filtered by search parameters
call-seq -> super.where(clauses = {})
|
# File 'lib/esp/resources/user.rb', line 38
|
Instance Method Details
#destroy ⇒ void
This method returns an undefined value.
Not Implemented. You cannot destroy a User.
18 19 20 |
# File 'lib/esp/resources/user.rb', line 18 def destroy fail ESP::NotImplementedError end |
#organization ⇒ ESP::Organization
The organization this user belongs to.
6 |
# File 'lib/esp/resources/user.rb', line 6 belongs_to :organization, class_name: 'ESP::Organization' |
#save ⇒ void
This method returns an undefined value.
Not Implemented. You cannot create or update a User.
11 12 13 |
# File 'lib/esp/resources/user.rb', line 11 def save fail ESP::NotImplementedError end |
#sub_organizations ⇒ ActiveResource::PaginatedCollection<ESP::SubOrganization>
The collection of sub organizations that belong to the user.
25 26 27 28 |
# File 'lib/esp/resources/user.rb', line 25 def sub_organizations return attributes['sub_organizations'] if attributes['sub_organizations'].present? SubOrganization.where(id_in: sub_organization_ids) end |
#teams ⇒ ActiveResource::PaginatedCollection<ESP::Team>
The collection of teams that belong to the user.
33 34 35 36 |
# File 'lib/esp/resources/user.rb', line 33 def teams return attributes['teams'] if attributes['teams'].present? Team.where(id_in: team_ids) end |