{"action":"opened","number":751,"pull_request":{"url":"https://api.github.com/repos/amatsuda/kaminari/pulls/751","id":50998728,"html_url":"https://github.com/amatsuda/kaminari/pull/751","diff_url":"https://github.com/amatsuda/kaminari/pull/751.diff","patch_url":"https://github.com/amatsuda/kaminari/pull/751.patch","issue_url":"https://api.github.com/repos/amatsuda/kaminari/issues/751","number":751,"state":"open","locked":false,"title":"add #repaginate_out_of_range method","user":{"login":"danieltdt","id":161157,"avatar_url":"https://avatars.githubusercontent.com/u/161157?v=3","gravatar_id":"","url":"https://api.github.com/users/danieltdt","html_url":"https://github.com/danieltdt","followers_url":"https://api.github.com/users/danieltdt/followers","following_url":"https://api.github.com/users/danieltdt/following{/other_user}","gists_url":"https://api.github.com/users/danieltdt/gists{/gist_id}","starred_url":"https://api.github.com/users/danieltdt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieltdt/subscriptions","organizations_url":"https://api.github.com/users/danieltdt/orgs","repos_url":"https://api.github.com/users/danieltdt/repos","events_url":"https://api.github.com/users/danieltdt/events{/privacy}","received_events_url":"https://api.github.com/users/danieltdt/received_events","type":"User","site_admin":false},"body":"This allows to define a custom behavior when #page is called with a value out of\r\nrange.\r\n\r\nFor example, when setting\r\n```ruby\r\n  # given there are 100 articles\r\n  Article.page(10).per(25).all\r\n  # => []\r\n\r\n  Article.when_page_is_out_of_range_set :first\r\n  Article.page(10).per(25).all\r\n  # => # the first 25 articles\r\n\r\n  Article.when_page_is_out_of_range_set :last\r\n  Article.page(10).per(25).all\r\n  # => # the last 25 articles\r\n```\r\n\r\nThis behavior is useful when you are deleting resources from a list and you are\r\non the last page. If the last page has only one resource, after deleting it you\r\ncan redirect the user to the previous (last) page or force the first page.","created_at":"2015-11-17T20:19:00Z","updated_at":"2015-11-17T20:19:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b49f270963dc994e2fe63a1c3156df0e61d7ce34","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amatsuda/kaminari/pulls/751/commits","review_comments_url":"https://api.github.com/repos/amatsuda/kaminari/pulls/751/comments","review_comment_url":"https://api.github.com/repos/amatsuda/kaminari/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amatsuda/kaminari/issues/751/comments","statuses_url":"https://api.github.com/repos/amatsuda/kaminari/statuses/b7eac1c671207cfd5a817f7b5b2e52e1f08a6a15","head":{"label":"danieltdt:page-fallback","ref":"page-fallback","sha":"b7eac1c671207cfd5a817f7b5b2e52e1f08a6a15","user":{"login":"danieltdt","id":161157,"avatar_url":"https://avatars.githubusercontent.com/u/161157?v=3","gravatar_id":"","url":"https://api.github.com/users/danieltdt","html_url":"https://github.com/danieltdt","followers_url":"https://api.github.com/users/danieltdt/followers","following_url":"https://api.github.com/users/danieltdt/following{/other_user}","gists_url":"https://api.github.com/users/danieltdt/gists{/gist_id}","starred_url":"https://api.github.com/users/danieltdt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieltdt/subscriptions","organizations_url":"https://api.github.com/users/danieltdt/orgs","repos_url":"https://api.github.com/users/danieltdt/repos","events_url":"https://api.github.com/users/danieltdt/events{/privacy}","received_events_url":"https://api.github.com/users/danieltdt/received_events","type":"User","site_admin":false},"repo":{"id":46361748,"name":"kaminari","full_name":"danieltdt/kaminari","owner":{"login":"danieltdt","id":161157,"avatar_url":"https://avatars.githubusercontent.com/u/161157?v=3","gravatar_id":"","url":"https://api.github.com/users/danieltdt","html_url":"https://github.com/danieltdt","followers_url":"https://api.github.com/users/danieltdt/followers","following_url":"https://api.github.com/users/danieltdt/following{/other_user}","gists_url":"https://api.github.com/users/danieltdt/gists{/gist_id}","starred_url":"https://api.github.com/users/danieltdt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieltdt/subscriptions","organizations_url":"https://api.github.com/users/danieltdt/orgs","repos_url":"https://api.github.com/users/danieltdt/repos","events_url":"https://api.github.com/users/danieltdt/events{/privacy}","received_events_url":"https://api.github.com/users/danieltdt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danieltdt/kaminari","description":"A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Rails 3 and 4","fork":true,"url":"https://api.github.com/repos/danieltdt/kaminari","forks_url":"https://api.github.com/repos/danieltdt/kaminari/forks","keys_url":"https://api.github.com/repos/danieltdt/kaminari/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danieltdt/kaminari/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danieltdt/kaminari/teams","hooks_url":"https://api.github.com/repos/danieltdt/kaminari/hooks","issue_events_url":"https://api.github.com/repos/danieltdt/kaminari/issues/events{/number}","events_url":"https://api.github.com/repos/danieltdt/kaminari/events","assignees_url":"https://api.github.com/repos/danieltdt/kaminari/assignees{/user}","branches_url":"https://api.github.com/repos/danieltdt/kaminari/branches{/branch}","tags_url":"https://api.github.com/repos/danieltdt/kaminari/tags","blobs_url":"https://api.github.com/repos/danieltdt/kaminari/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danieltdt/kaminari/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danieltdt/kaminari/git/refs{/sha}","trees_url":"https://api.github.com/repos/danieltdt/kaminari/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danieltdt/kaminari/statuses/{sha}","languages_url":"https://api.github.com/repos/danieltdt/kaminari/languages","stargazers_url":"https://api.github.com/repos/danieltdt/kaminari/stargazers","contributors_url":"https://api.github.com/repos/danieltdt/kaminari/contributors","subscribers_url":"https://api.github.com/repos/danieltdt/kaminari/subscribers","subscription_url":"https://api.github.com/repos/danieltdt/kaminari/subscription","commits_url":"https://api.github.com/repos/danieltdt/kaminari/commits{/sha}","git_commits_url":"https://api.github.com/repos/danieltdt/kaminari/git/commits{/sha}","comments_url":"https://api.github.com/repos/danieltdt/kaminari/comments{/number}","issue_comment_url":"https://api.github.com/repos/danieltdt/kaminari/issues/comments{/number}","contents_url":"https://api.github.com/repos/danieltdt/kaminari/contents/{+path}","compare_url":"https://api.github.com/repos/danieltdt/kaminari/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danieltdt/kaminari/merges","archive_url":"https://api.github.com/repos/danieltdt/kaminari/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danieltdt/kaminari/downloads","issues_url":"https://api.github.com/repos/danieltdt/kaminari/issues{/number}","pulls_url":"https://api.github.com/repos/danieltdt/kaminari/pulls{/number}","milestones_url":"https://api.github.com/repos/danieltdt/kaminari/milestones{/number}","notifications_url":"https://api.github.com/repos/danieltdt/kaminari/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danieltdt/kaminari/labels{/name}","releases_url":"https://api.github.com/repos/danieltdt/kaminari/releases{/id}","created_at":"2015-11-17T16:57:51Z","updated_at":"2015-11-17T16:57:52Z","pushed_at":"2015-11-17T20:18:31Z","git_url":"git://github.com/danieltdt/kaminari.git","ssh_url":"git@github.com:danieltdt/kaminari.git","clone_url":"https://github.com/danieltdt/kaminari.git","svn_url":"https://github.com/danieltdt/kaminari","homepage":"https://github.com/amatsuda/kaminari/wiki","size":1028,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"amatsuda:master","ref":"master","sha":"aaaaec33a37b4edbc355f80a302cf77793d3faa3","user":{"login":"amatsuda","id":11493,"avatar_url":"https://avatars.githubusercontent.com/u/11493?v=3","gravatar_id":"","url":"https://api.github.com/users/amatsuda","html_url":"https://github.com/amatsuda","followers_url":"https://api.github.com/users/amatsuda/followers","following_url":"https://api.github.com/users/amatsuda/following{/other_user}","gists_url":"https://api.github.com/users/amatsuda/gists{/gist_id}","starred_url":"https://api.github.com/users/amatsuda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amatsuda/subscriptions","organizations_url":"https://api.github.com/users/amatsuda/orgs","repos_url":"https://api.github.com/users/amatsuda/repos","events_url":"https://api.github.com/users/amatsuda/events{/privacy}","received_events_url":"https://api.github.com/users/amatsuda/received_events","type":"User","site_admin":false},"repo":{"id":1333863,"name":"kaminari","full_name":"amatsuda/kaminari","owner":{"login":"amatsuda","id":11493,"avatar_url":"https://avatars.githubusercontent.com/u/11493?v=3","gravatar_id":"","url":"https://api.github.com/users/amatsuda","html_url":"https://github.com/amatsuda","followers_url":"https://api.github.com/users/amatsuda/followers","following_url":"https://api.github.com/users/amatsuda/following{/other_user}","gists_url":"https://api.github.com/users/amatsuda/gists{/gist_id}","starred_url":"https://api.github.com/users/amatsuda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amatsuda/subscriptions","organizations_url":"https://api.github.com/users/amatsuda/orgs","repos_url":"https://api.github.com/users/amatsuda/repos","events_url":"https://api.github.com/users/amatsuda/events{/privacy}","received_events_url":"https://api.github.com/users/amatsuda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amatsuda/kaminari","description":"A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Rails 3 and 4","fork":false,"url":"https://api.github.com/repos/amatsuda/kaminari","forks_url":"https://api.github.com/repos/amatsuda/kaminari/forks","keys_url":"https://api.github.com/repos/amatsuda/kaminari/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amatsuda/kaminari/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amatsuda/kaminari/teams","hooks_url":"https://api.github.com/repos/amatsuda/kaminari/hooks","issue_events_url":"https://api.github.com/repos/amatsuda/kaminari/issues/events{/number}","events_url":"https://api.github.com/repos/amatsuda/kaminari/events","assignees_url":"https://api.github.com/repos/amatsuda/kaminari/assignees{/user}","branches_url":"https://api.github.com/repos/amatsuda/kaminari/branches{/branch}","tags_url":"https://api.github.com/repos/amatsuda/kaminari/tags","blobs_url":"https://api.github.com/repos/amatsuda/kaminari/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amatsuda/kaminari/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amatsuda/kaminari/git/refs{/sha}","trees_url":"https://api.github.com/repos/amatsuda/kaminari/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amatsuda/kaminari/statuses/{sha}","languages_url":"https://api.github.com/repos/amatsuda/kaminari/languages","stargazers_url":"https://api.github.com/repos/amatsuda/kaminari/stargazers","contributors_url":"https://api.github.com/repos/amatsuda/kaminari/contributors","subscribers_url":"https://api.github.com/repos/amatsuda/kaminari/subscribers","subscription_url":"https://api.github.com/repos/amatsuda/kaminari/subscription","commits_url":"https://api.github.com/repos/amatsuda/kaminari/commits{/sha}","git_commits_url":"https://api.github.com/repos/amatsuda/kaminari/git/commits{/sha}","comments_url":"https://api.github.com/repos/amatsuda/kaminari/comments{/number}","issue_comment_url":"https://api.github.com/repos/amatsuda/kaminari/issues/comments{/number}","contents_url":"https://api.github.com/repos/amatsuda/kaminari/contents/{+path}","compare_url":"https://api.github.com/repos/amatsuda/kaminari/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amatsuda/kaminari/merges","archive_url":"https://api.github.com/repos/amatsuda/kaminari/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amatsuda/kaminari/downloads","issues_url":"https://api.github.com/repos/amatsuda/kaminari/issues{/number}","pulls_url":"https://api.github.com/repos/amatsuda/kaminari/pulls{/number}","milestones_url":"https://api.github.com/repos/amatsuda/kaminari/milestones{/number}","notifications_url":"https://api.github.com/repos/amatsuda/kaminari/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amatsuda/kaminari/labels{/name}","releases_url":"https://api.github.com/repos/amatsuda/kaminari/releases{/id}","created_at":"2011-02-06T08:07:20Z","updated_at":"2015-11-17T20:01:31Z","pushed_at":"2015-11-17T20:19:00Z","git_url":"git://github.com/amatsuda/kaminari.git","ssh_url":"git@github.com:amatsuda/kaminari.git","clone_url":"https://github.com/amatsuda/kaminari.git","svn_url":"https://github.com/amatsuda/kaminari","homepage":"https://github.com/amatsuda/kaminari/wiki","size":3673,"stargazers_count":5394,"watchers_count":5394,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":729,"mirror_url":null,"open_issues_count":41,"forks":729,"open_issues":41,"watchers":5394,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/751"},"html":{"href":"https://github.com/amatsuda/kaminari/pull/751"},"issue":{"href":"https://api.github.com/repos/amatsuda/kaminari/issues/751"},"comments":{"href":"https://api.github.com/repos/amatsuda/kaminari/issues/751/comments"},"review_comments":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/751/comments"},"review_comment":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/751/commits"},"statuses":{"href":"https://api.github.com/repos/amatsuda/kaminari/statuses/b7eac1c671207cfd5a817f7b5b2e52e1f08a6a15"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":98,"deletions":0,"changed_files":6}}