i18n_rails_helpers 1.4.1 → 1.4.2
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.
| @@ -62,7 +62,7 @@ module ContextualLinkHelpers | |
| 62 62 | 
             
                  default_model = controller_name.singularize.camelize.constantize
         | 
| 63 63 | 
             
                  model = resource_or_model || default_model
         | 
| 64 64 | 
             
                  explicit_resource_or_model = default_model != model
         | 
| 65 | 
            -
                when :show, :edit, :delete
         | 
| 65 | 
            +
                when :show, :edit, :delete, :destroy
         | 
| 66 66 | 
             
                  default_resource = instance_variable_get("@#{controller_name.singularize}")
         | 
| 67 67 | 
             
                  resource = resource_or_model || default_resource
         | 
| 68 68 | 
             
                  model = resource.class
         | 
| @@ -75,7 +75,7 @@ module ContextualLinkHelpers | |
| 75 75 |  | 
| 76 76 | 
             
                # Option generation
         | 
| 77 77 | 
             
                case action
         | 
| 78 | 
            -
                when :delete
         | 
| 78 | 
            +
                when :delete, :destroy
         | 
| 79 79 | 
             
                  options.merge!(:confirm => t_confirm_delete(resource), :method => :delete)
         | 
| 80 80 | 
             
                end
         | 
| 81 81 |  | 
| @@ -121,9 +121,9 @@ module ContextualLinkHelpers | |
| 121 121 | 
             
                when :new, :create
         | 
| 122 122 | 
             
                  actions << :index
         | 
| 123 123 | 
             
                when :show
         | 
| 124 | 
            -
                  actions += [:edit, : | 
| 124 | 
            +
                  actions += [:edit, :destroy, :index]
         | 
| 125 125 | 
             
                when :edit, :update
         | 
| 126 | 
            -
                  actions += [:show, : | 
| 126 | 
            +
                  actions += [:show, :destroy, :index]
         | 
| 127 127 | 
             
                when :index
         | 
| 128 128 | 
             
                  actions << :new
         | 
| 129 129 | 
             
                end
         |