Module: Hyrax::Permissions::Writable
- Extended by:
- ActiveSupport::Concern
- Includes:
- Hydra::AccessControls::Permissions, Hydra::AccessControls::Visibility
- Included in:
- Hyrax::Permissions
- Defined in:
- app/models/concerns/hyrax/permissions/writable.rb
Instance Method Summary collapse
Instance Method Details
#paranoid_permissions ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'app/models/concerns/hyrax/permissions/writable.rb', line 22 def valid = true .each do |validation| next unless validation[:condition].call(self) errors[validation[:key]] ||= [] errors[validation[:key]] << validation[:message] valid = false end valid end |