class AppPaginationComponent
Public Class Methods
Source
# File app/components/app_pagination_component.rb, line 4 def initialize( pagy: nil, next_text: nil, previous_text: nil, block_mode: false, landmark_label: config.default_pagination_landmark_label, classes: [], html_attributes: {}, anchor: nil ) @anchor = anchor super( pagy:, next_text:, previous_text:, block_mode:, landmark_label:, classes:, html_attributes: ) end
Calls superclass method
Public Instance Methods
Source
# File app/components/app_pagination_component.rb, line 26 def before_render @page_items = if pagy.present? build_items elsif items.any? items else [] end @previous_content = previous_page || build_previous&.render_in(view_context) @next_content = next_page || build_next&.render_in(view_context) end