Module: Phlexi::Form::Options::Required
- Included in:
- Builder
- Defined in:
- lib/phlexi/form/options/required.rb
Instance Method Summary collapse
Instance Method Details
#required!(required = true) ⇒ Object
11 12 13 14 |
# File 'lib/phlexi/form/options/required.rb', line 11 def required!(required = true) [:required] = required self end |
#required? ⇒ Boolean
7 8 9 |
# File 'lib/phlexi/form/options/required.rb', line 7 def required? .fetch(:required) { [:required] = calculate_required } end |