Class CharacterQuery
In: app/models/character_query.rb
Parent: ActiveRecord::Base

This is used to find complicated characters such as chinese characters. There is a strong correlation between character query and whether character parts exist. Namely, character queries allow an inexpensive algorithmic means of finding characters by their parts.

Methods

Public Instance methods

[Source]

    # File app/models/character_query.rb, line 10
10:   def to_label
11:     "#{query} [#{language_character_query.to_label}]"
12:   end

Protected Instance methods

[Source]

    # File app/models/character_query.rb, line 15
15:   def authorized_for_create?
16:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ADMIN)
17:   end

[Source]

    # File app/models/character_query.rb, line 23
23:   def authorized_for_destroy?
24:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ADMIN)
25:   end

[Source]

    # File app/models/character_query.rb, line 27
27:   def authorized_for_read?
28:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_USER)
29:   end

[Source]

    # File app/models/character_query.rb, line 19
19:   def authorized_for_update?
20:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ADMIN)
21:   end

[Validate]