Module: Avo::Fields::Concerns::IsDisabled
- Extended by:
- ActiveSupport::Concern
- Included in:
- BaseField
- Defined in:
- lib/avo/fields/concerns/is_disabled.rb
Instance Attribute Summary collapse
-
#disabled ⇒ Object
readonly
Returns the value of attribute disabled.
Instance Method Summary collapse
Instance Attribute Details
#disabled ⇒ Object (readonly)
Returns the value of attribute disabled.
7 8 9 |
# File 'lib/avo/fields/concerns/is_disabled.rb', line 7 def disabled @disabled end |
Instance Method Details
#is_disabled? ⇒ Boolean
9 10 11 12 13 14 15 |
# File 'lib/avo/fields/concerns/is_disabled.rb', line 9 def is_disabled? if disabled.respond_to? :call Avo::Hosts::ResourceViewRecordHost.new(block: disabled, record: model, view: view, resource: resource).handle else disabled end end |