# File lib/will_paginate/view_helpers/base.rb, line 41
      def will_paginate(collection, options = {})
        # early exit if there is nothing to render
        return nil unless collection.total_pages > 1
        
        options = WillPaginate::ViewHelpers.pagination_options.merge(options)
        
        if options[:prev_label]
          WillPaginate::Deprecation::warn(":prev_label view parameter is now :previous_label; the old name has been deprecated.")
          options[:previous_label] = options.delete(:prev_label)
        end
        
        # get the renderer instance
        renderer = case options[:renderer]
        when String
          options[:renderer].constantize.new
        when Class
          options[:renderer].new
        else
          options[:renderer]
        end
        # render HTML for pagination
        renderer.prepare collection, options, self
        renderer.to_html
      end