Class: Comee::Core::User
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Comee::Core::User
- Defined in:
- app/models/comee/core/user.rb
Instance Method Summary collapse
- #application_roles(application) ⇒ Object
- #application_roles?(application) ⇒ Boolean
- #delivery_options ⇒ Object
Instance Method Details
#application_roles(application) ⇒ Object
35 36 37 38 |
# File 'app/models/comee/core/user.rb', line 35 def application_roles(application) roles.references(:user_application_roles) .where(comee_core_user_application_roles: {application_module_id: application.id}) end |
#application_roles?(application) ⇒ Boolean
28 29 30 31 32 33 |
# File 'app/models/comee/core/user.rb', line 28 def application_roles?(application) roles.references(:user_application_roles) .where(comee_core_user_application_roles: {application_module_id: application.id}) .count .positive? end |
#delivery_options ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/comee/core/user.rb', line 14 def setting = email_setting { address: setting.smtp_address, port: setting.smtp_port, user_name: setting.smtp_user, password: setting.smtp_password, authentication: setting.authentication, enable_starttls_auto: setting.starttls_auto, open_timeout: setting.open_timeout, read_timeout: setting.read_timeout } end |