Sha256: bd6e7331290e510dd526cca8a0855577b1e32f2dd4b6eed606d2a3641edba88a

Contents?: true

Size: 774 Bytes

Versions: 7

Compression:

Stored size: 774 Bytes

Contents

module Faalis
  module Generators
    module Concerns
      module Bulk

        def self.included(base)
          # Fields to use in in bulk edit, comma separated
          #base.class_option :bulk_fields, :type => :string, :default => "", :desc => "Fields to use in in bulk edit, comma separated"

          # No bulk edit needed
          #base.class_option :no_bulk, :type => :boolean, :default => false, :desc => "No bulk edit needed"
        end

        private

        # Returns fields which is needed to be in bulk edit
        def bulk_edit_fields
          fields_with("bulk", true)
        end

        def no_bulk?
          if bulk_edit_fields.length > 0
            true
          else
            false
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
faalis-0.24.2 lib/faalis/generators/concerns/bulk.rb
faalis-0.24.0 lib/faalis/generators/concerns/bulk.rb
faalis-0.23.0 lib/faalis/generators/concerns/bulk.rb
faalis-0.22.0 lib/faalis/generators/concerns/bulk.rb
faalis-0.21.1 lib/faalis/generators/concerns/bulk.rb
faalis-0.21.0 lib/faalis/generators/concerns/bulk.rb
faalis-0.20.0 lib/faalis/generators/concerns/bulk.rb