Sha256: ed778082624f8e0a5274e57f595128ecd537256509a89f5f5d514894aaba08d1

Contents?: true

Size: 416 Bytes

Versions: 10

Compression:

Stored size: 416 Bytes

Contents

module Faalis
  module Generators
    module Concerns

      # Adds `required` key to `fields`. Fields with this key as true will
      # be non optional fields
      module RequireFields

        private

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
faalis-2.0.0.rc6 lib/faalis/generators/concerns/required.rb
faalis-2.0.0.rc5 lib/faalis/generators/concerns/required.rb
faalis-2.0.0.rc4 lib/faalis/generators/concerns/required.rb
faalis-2.0.0.rc3 lib/faalis/generators/concerns/required.rb
faalis-2.0.0.rc2 lib/faalis/generators/concerns/required.rb
faalis-1.0.0 lib/faalis/generators/concerns/required.rb
faalis-1.0.0.alpha4 lib/faalis/generators/concerns/required.rb
faalis-1.0.0.alpha3 lib/faalis/generators/concerns/required.rb
faalis-1.0.0.alpha2 lib/faalis/generators/concerns/required.rb
faalis-1.0.0.alpha1 lib/faalis/generators/concerns/required.rb