Railsã«ã¯paginateã¨ãã便å©ãªã¡ã½ããããã£ã¦ãgoogleã¿ããã«ããããã®æ¤ç´¢çµæã è¤æ°ãã¼ã¸ã«ãããã®ãç°¡åã«ã§ããã(Previous, Nextã¨ããã¼ã¸ã®æå¾ã«è¡¨ç¤ºããããã¤ãï¼ ãã¡ãã®ãã¼ã¸ãããããããã åé¡ã¯ãèªåã§SQLæãæ¸ãã¦find_by_sqlã§ãã¼ã¿ãå¼ã£å¼µã£ã¦ãã¦ããã¨ãã ã paginageã¯railsåãä»ãã®findã¡ã½ããã使ã£ã¦ããã¨ãç¨ã«æ¸ããã¦ããã®ã§ã SQLæã®çæ¸ãããã¦ããã¨ãã¯ããã®ã¾ã¾ã§ã¯ä½¿ããªãã railsã®ã½ã¼ã¹ rails/actionpack/lib/action_controller/pagination.rbãã¿ãã¨ã paginateã®ã½ã¼ã¹ã¯ä»¥ä¸ã®ããã«ãªã£ã¦ããã pagination.rb def paginate(collection_id, options={}) Pagination.v
{{#tags}}- {{label}}
{{/tags}}