effective_resources 2.9.4 → 2.9.6
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
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 39e741d139479e1a017d296ec0969dfdfb3538306eaed9c68bf6d1cd0989ea0a
         | 
| 4 | 
            +
              data.tar.gz: ba6488be9829f625c38cef081721a1c2c446fc3bbe1f99afdcf95624e0364dc5
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 7cee67d34504f2ccfb3e211336b04c22247245f03893cf0f5ec832c87ee3c1d2d6fc0cb3628b5bc5f889245d81a872904d7cadc7c7116fd0aab787ba3e270885
         | 
| 7 | 
            +
              data.tar.gz: '03317804a2b7867a4ae53016b82ff68a406e17333bccb413a9cb935d2c990ed242f6c64d1afd5bf74caf452c2e3dcc1545189f9dfeb0d8bad1be52134009ccf4'
         | 
| @@ -45,9 +45,11 @@ module Effective | |
| 45 45 | 
             
                    return if step == 'wicked_finish'
         | 
| 46 46 | 
             
                    return if resource.blank?
         | 
| 47 47 | 
             
                    return if resource.try(:done?)
         | 
| 48 | 
            -
                    return unless resource_scope.respond_to?(:in_progress)
         | 
| 48 | 
            +
                    return unless resource_scope.respond_to?(:in_progress_for) || resource_scope.respond_to?(:in_progress)
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                    in_progress = resource_scope.try(:in_progress_for, current_user) || resource_scope.try(:in_progress)
         | 
| 51 | 
            +
                    existing = in_progress.order(:id).where.not(id: resource).first
         | 
| 49 52 |  | 
| 50 | 
            -
                    existing = resource_scope.in_progress.order(:id).where.not(id: resource).first
         | 
| 51 53 | 
             
                    return unless existing.present?
         | 
| 52 54 | 
             
                    return if resource.persisted? && (existing.id > resource.id) # Otherwise we get an infinite loop
         | 
| 53 55 |  | 
| @@ -21,6 +21,18 @@ module ActsAsWizard | |
| 21 21 | 
             
                end
         | 
| 22 22 | 
             
              end
         | 
| 23 23 |  | 
| 24 | 
            +
              module ClassMethods
         | 
| 25 | 
            +
                def acts_as_wizard?; true; end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                def wizard_steps_hash
         | 
| 28 | 
            +
                  const_get(:WIZARD_STEPS)
         | 
| 29 | 
            +
                end
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                def all_wizard_steps
         | 
| 32 | 
            +
                  const_get(:WIZARD_STEPS).keys
         | 
| 33 | 
            +
                end
         | 
| 34 | 
            +
              end
         | 
| 35 | 
            +
             | 
| 24 36 | 
             
              included do
         | 
| 25 37 | 
             
                acts_as_wizard_options = @acts_as_wizard_options
         | 
| 26 38 |  | 
| @@ -180,17 +192,6 @@ module ActsAsWizard | |
| 180 192 |  | 
| 181 193 | 
             
              end
         | 
| 182 194 |  | 
| 183 | 
            -
              module ClassMethods
         | 
| 184 | 
            -
                def acts_as_wizard?; true; end
         | 
| 185 | 
            -
             | 
| 186 | 
            -
                def wizard_steps_hash
         | 
| 187 | 
            -
                  const_get(:WIZARD_STEPS)
         | 
| 188 | 
            -
                end
         | 
| 189 195 |  | 
| 190 | 
            -
                def all_wizard_steps
         | 
| 191 | 
            -
                  const_get(:WIZARD_STEPS).keys
         | 
| 192 | 
            -
                end
         | 
| 193 | 
            -
             | 
| 194 | 
            -
              end
         | 
| 195 196 |  | 
| 196 197 | 
             
            end
         | 
| @@ -4,7 +4,7 @@ | |
| 4 4 | 
             
            <% if local_assigns[:html_template].present? %>
         | 
| 5 5 | 
             
              EffectiveForm.remote_form_payload = "<%= j(render_resource_partial(@resource, action: action)) %>";
         | 
| 6 6 | 
             
            <% else %>
         | 
| 7 | 
            -
              EffectiveForm.remote_form_payload = "<%= j(render_resource_form(@resource, action: action, safe: true).presence || render_resource_partial(@resource)) %>";
         | 
| 7 | 
            +
              EffectiveForm.remote_form_payload = "<%= j(render_resource_form(@resource, action: action, safe: true).presence || render_resource_partial(@resource, safe: true)) %>";
         | 
| 8 8 | 
             
            <% end %>
         | 
| 9 9 |  | 
| 10 10 | 
             
            EffectiveForm.remote_form_commit = "<%= params[:commit] %>";
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: effective_resources
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.9. | 
| 4 | 
            +
              version: 2.9.6
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Code and Effect
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023-08- | 
| 11 | 
            +
            date: 2023-08-26 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         |