add global limit scope
This commit is contained in:
@@ -5,6 +5,10 @@ module Danbooru
|
|||||||
module ActiveRecordExtension
|
module ActiveRecordExtension
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
|
included do
|
||||||
|
default_scope limit(1)
|
||||||
|
end
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
def paginate(page, options = {})
|
def paginate(page, options = {})
|
||||||
@paginator_options = options
|
@paginator_options = options
|
||||||
|
|||||||
Reference in New Issue
Block a user