Module: Faalis::Generators::Concerns::RequireFields

Included in:
DashboardScaffold
Defined in:
lib/faalis/generators/concerns/required.rb

Overview

Adds required key to fields. Fields with this key as true will be non optional fields

Instance Method Summary (collapse)

Instance Method Details

- (Object) required_fields (private)



11
12
13
14
# File 'lib/faalis/generators/concerns/required.rb', line 11

def required_fields
  # Returnes an array contains name of all fields with require = true
  fields_with('required', true).collect {|x| x['name']}
end