kaminari 0.2.1 → 0.3.0
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.
Potentially problematic release.
This version of kaminari might be problematic. Click here for more details.
- data/TODO.txt +0 -2
- data/VERSION +1 -1
- data/kaminari.gemspec +1 -1
- data/lib/kaminari/helpers.rb +23 -2
- metadata +4 -4
    
        data/TODO.txt
    CHANGED
    
    
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0. | 
| 1 | 
            +
            0.3.0
         | 
    
        data/kaminari.gemspec
    CHANGED
    
    
    
        data/lib/kaminari/helpers.rb
    CHANGED
    
    | @@ -63,8 +63,10 @@ module Kaminari | |
| 63 63 | 
             
                  end
         | 
| 64 64 |  | 
| 65 65 | 
             
                  def to_s
         | 
| 66 | 
            -
                     | 
| 67 | 
            -
                       | 
| 66 | 
            +
                    suppress_logging_render_partial do
         | 
| 67 | 
            +
                      @template.content_tag :div, :class => 'pagination' do
         | 
| 68 | 
            +
                        tagify.join("\n").html_safe
         | 
| 69 | 
            +
                      end
         | 
| 68 70 | 
             
                    end
         | 
| 69 71 | 
             
                  end
         | 
| 70 72 |  | 
| @@ -96,6 +98,25 @@ module Kaminari | |
| 96 98 | 
             
                  def method_missing(meth, *args, &blk)
         | 
| 97 99 | 
             
                    @template.send meth, *args, &blk
         | 
| 98 100 | 
             
                  end
         | 
| 101 | 
            +
             | 
| 102 | 
            +
                  def suppress_logging_render_partial(&blk)
         | 
| 103 | 
            +
                    if subscriber = ActionView::LogSubscriber.log_subscribers.detect {|ls| ls.is_a? ActionView::LogSubscriber}
         | 
| 104 | 
            +
                      class << subscriber
         | 
| 105 | 
            +
                        alias_method :render_partial_with_logging, :render_partial
         | 
| 106 | 
            +
                        # do nothing
         | 
| 107 | 
            +
                        def render_partial(event)
         | 
| 108 | 
            +
                        end
         | 
| 109 | 
            +
                      end
         | 
| 110 | 
            +
                      ret = blk.call
         | 
| 111 | 
            +
                      class << subscriber
         | 
| 112 | 
            +
                        alias_method :render_partial, :render_partial_with_logging
         | 
| 113 | 
            +
                        undef :render_partial_with_logging
         | 
| 114 | 
            +
                      end
         | 
| 115 | 
            +
                      ret
         | 
| 116 | 
            +
                    else
         | 
| 117 | 
            +
                      blk.call
         | 
| 118 | 
            +
                    end
         | 
| 119 | 
            +
                  end
         | 
| 99 120 | 
             
                end
         | 
| 100 121 |  | 
| 101 122 | 
             
                def paginate(scope, options = {}, &block)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: kaminari
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 19
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 | 
            -
              -  | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0. | 
| 8 | 
            +
              - 3
         | 
| 9 | 
            +
              - 0
         | 
| 10 | 
            +
              version: 0.3.0
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Akira Matsuda
         |