Class: WillPaginate::ActionView::LinkRenderer

### Home Classes Methods

### In Files

- lib/will_paginate/view_helpers/action_view.rb

### Parent

ViewHelpers::LinkRenderer

### Methods

- #add_current_page_param
- #default_url_params
- #merge_get_params
- #merge_optional_params
- #url

### Class/Module Index

Quicksearch

- WillPaginate
- WillPaginate::ActionView
- WillPaginate::ActionView::LinkRenderer
- WillPaginate::ActiveRecord
- WillPaginate::ActiveRecord::BaseMethods
- WillPaginate::ActiveRecord::Pagination
- WillPaginate::ActiveRecord::RelationMethods
- WillPaginate::Collection
- WillPaginate::CollectionMethods
- WillPaginate::DataMapper
- WillPaginate::DataMapper::CollectionMethods
- WillPaginate::DataMapper::Pagination
- WillPaginate::Deprecation
- WillPaginate::Deprecation::Hash
- WillPaginate::I18n
- WillPaginate::InvalidPage
- WillPaginate::Merb
- WillPaginate::Merb::LinkRenderer
- WillPaginate::PageNumber
- WillPaginate::PerPage
- WillPaginate::PerPage::Inheritance
- WillPaginate::Railtie
- WillPaginate::Railtie::ControllerRescuePatch
- WillPaginate::Railtie::ShowExceptionsPatch
- WillPaginate::SequelMethods
- WillPaginate::Sinatra
- WillPaginate::Sinatra::Helpers
- WillPaginate::Sinatra::LinkRenderer
- WillPaginate::ViewHelpers
- WillPaginate::ViewHelpers::LinkRenderer
- WillPaginate::ViewHelpers::LinkRendererBase
- Array
- Object

No matching classes.

# WillPaginate::ActionView::LinkRenderer

### Protected Instance Methods

add_current_page_param(url_params, page) click to toggle source

    # File lib/will_paginate/view_helpers/action_view.rb, line 131
    def add_current_page_param(url_params, page)
      unless param_name.index(/[^\w-]/)
        url_params[param_name.to_sym] = page
      else
        page_param = parse_query_parameters("#{param_name}=#{page}")
        symbolized_update(url_params, page_param)
      end
    end

default_url_params() click to toggle source

    # File lib/will_paginate/view_helpers/action_view.rb, line 102
    def default_url_params
      {}
    end

merge_get_params(url_params) click to toggle source

    # File lib/will_paginate/view_helpers/action_view.rb, line 119
    def merge_get_params(url_params)
      if @template.respond_to? :request and @template.request and @template.request.get?
        symbolized_update(url_params, @template.params)
      end
      url_params
    end

merge_optional_params(url_params) click to toggle source

    # File lib/will_paginate/view_helpers/action_view.rb, line 126
    def merge_optional_params(url_params)
      symbolized_update(url_params, @options[:params]) if @options[:params]
      url_params
    end

url(page) click to toggle source

    # File lib/will_paginate/view_helpers/action_view.rb, line 106
    def url(page)
      @base_url_params ||= begin
        url_params = merge_get_params(default_url_params)
        url_params[:only_path] = true
        merge_optional_params(url_params)
      end

      url_params = @base_url_params.dup
      add_current_page_param(url_params, page)

      @template.url_for(url_params)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.