Class VocabularyListsWord
In: app/models/vocabulary_lists_word.rb
Parent: ActiveRecord::Base

Methods

Public Instance methods

[Source]

   # File app/models/vocabulary_lists_word.rb, line 7
7:   def definitions
8:     word.definitions
9:   end

[Source]

    # File app/models/vocabulary_lists_word.rb, line 11
11:   def to_label
12:     word.spelling
13:   end

Protected Instance methods

[Source]

    # File app/models/vocabulary_lists_word.rb, line 17
17:   def authorized_for_create?
18:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ADMIN) || is_current_user_member?
19:   end

[Source]

    # File app/models/vocabulary_lists_word.rb, line 25
25:   def authorized_for_destroy?
26:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ADMIN) || is_current_user_member?
27:   end

[Source]

    # File app/models/vocabulary_lists_word.rb, line 29
29:   def authorized_for_read?
30:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_USER)
31:   end

[Source]

    # File app/models/vocabulary_lists_word.rb, line 21
21:   def authorized_for_update?
22:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ADMIN) || is_current_user_member?
23:   end

[Validate]