Class Part
In: app/models/part.rb
Parent: ActiveRecord::Base

Methods

Public Instance methods

[Source]

    # File app/models/part.rb, line 20
20:   def description
21:     to_label
22:   end

[Source]

    # File app/models/part.rb, line 15
15:   def to_label
16:     language_part = "activerecord.attributes.part.#{language.iso_639_code}.#{part}"
17:     return I18n.t(language_part)     
18:   end

Protected Instance methods

[Source]

    # File app/models/part.rb, line 26
26:   def authorized_for_create?
27:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ROOT)
28:   end

[Source]

    # File app/models/part.rb, line 34
34:   def authorized_for_destroy?
35:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ROOT)
36:   end

[Source]

    # File app/models/part.rb, line 38
38:   def authorized_for_read?
39:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_USER)
40:   end

[Source]

    # File app/models/part.rb, line 30
30:   def authorized_for_update?
31:     return Authorize.is_role_allowed_for_user?(current_user, UserRole::USER_ROLE_ROOT)
32:   end

[Validate]