importance 0.2.8 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/importance/imports_controller.rb +5 -5
- data/lib/importance/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c6df73c1224caf34550ec06412c5b3d8593e8c739fe5d230aa8b21162943a345
         | 
| 4 | 
            +
              data.tar.gz: 1fca5891610167a012e98f5657031110cc1ac0fbc9e6829919f0a40c6726404a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 24197c88322351622f52a6dc0332364edfca5102790aa6623dbb05bced77d16738402c95e72591319d8f77a810cac58a62fd458f189b19aef20b9b97fb4d9193
         | 
| 7 | 
            +
              data.tar.gz: '018c9c0a074b89a12cf5d001dfcfff8a5edda9e2f09eb271583750fa47012b9052d86d4e459b52688df44ecdb80d22c1384419d28790ad401314d28c4cb7e81c'
         | 
| @@ -62,12 +62,12 @@ module Importance | |
| 62 62 |  | 
| 63 63 | 
             
                  if @importer.nil?
         | 
| 64 64 | 
             
                    flash[:alert] = t("importance.errors.no_importer")
         | 
| 65 | 
            -
                    render :map and return
         | 
| 65 | 
            +
                    render :map, status: :unprocessable_entity and return
         | 
| 66 66 | 
             
                  end
         | 
| 67 67 |  | 
| 68 68 | 
             
                  if params[:mappings].nil?
         | 
| 69 69 | 
             
                    flash[:alert] = t("importance.errors.no_mappings")
         | 
| 70 | 
            -
                    render :map and return
         | 
| 70 | 
            +
                    render :map, status: :unprocessable_entity and return
         | 
| 71 71 | 
             
                  end
         | 
| 72 72 |  | 
| 73 73 | 
             
                  @mappings = params[:mappings].permit!.to_h.map { |k, v| [ k.to_i, v ] }.to_h
         | 
| @@ -77,15 +77,15 @@ module Importance | |
| 77 77 | 
             
                    next if @mappings.values.include?(attribute.key.to_s)
         | 
| 78 78 |  | 
| 79 79 | 
             
                    flash[:alert] = t("importance.errors.missing_mapping", attribute: attribute.labels.first)
         | 
| 80 | 
            -
                    render :map and return
         | 
| 80 | 
            +
                    render :map, status: :unprocessable_entity and return
         | 
| 81 81 | 
             
                  end
         | 
| 82 82 |  | 
| 83 83 | 
             
                  @mappings.each do |column_index, attribute_name|
         | 
| 84 84 | 
             
                    next if attribute_name == ""
         | 
| 85 85 | 
             
                    next if @mappings.values.count(attribute_name) <= 1
         | 
| 86 86 |  | 
| 87 | 
            -
                    flash[:alert] = t("importance.errors.duplicate_mapping", attribute:  | 
| 88 | 
            -
                    render :map and return
         | 
| 87 | 
            +
                    flash[:alert] = t("importance.errors.duplicate_mapping", attribute: attribute.labels.first)
         | 
| 88 | 
            +
                    render :map, status: :unprocessable_entity and return
         | 
| 89 89 | 
             
                  end
         | 
| 90 90 |  | 
| 91 91 | 
             
                  if @importer.setup_callback
         | 
    
        data/lib/importance/version.rb
    CHANGED