Sha256: 4ad807d4c7cf924989fad74d79a2685e84e2479f63ea685971e3e06c69d5ce91

Contents?: true

Size: 402 Bytes

Versions: 10

Compression:

Stored size: 402 Bytes

Contents

module CsvImportMagic
  module Generators
    module OrmHelpers
      def model_contents(options)
        "  csv_import_magic :#{options[:columns].join(', :')}"
      end

      private

      def model_exists?
        File.exist?(File.join(destination_root, model_path))
      end

      def model_path
        @model_path ||= File.join('app', 'models', "#{file_path}.rb")
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
csv_import_magic-0.0.11 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.10 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.8 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.7 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.6 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.5 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.4 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.3 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.2 lib/generators/csv_import_magic/orm_helpers.rb
csv_import_magic-0.0.1 lib/generators/csv_import_magic/orm_helpers.rb