Remove unused Item.per_page
attribute
I feel like this was part of `will_paginate` back before the Rails community had itself figured out about what belongs in a model? But yeah, a default per-page value for search results does not belong here. And I don't think anything references it anymore, because we pass `per_page` to the `paginate` call in `ItemsController` explicitly! So, goodbye!
This commit is contained in:
parent
fb2bdd6ea5
commit
2e5b1c7350
1 changed files with 0 additions and 3 deletions
|
@ -18,9 +18,6 @@ class Item < ApplicationRecord
|
|||
SPECIAL_COLOR_DESCRIPTION_REGEX =
|
||||
/This item is only wearable by [a-zA-Z]+ painted ([a-zA-Z]+)\.|WARNING: This [a-zA-Z]+ can be worn by ([a-zA-Z]+) [a-zA-Z]+ ONLY!|If your Neopet is not painted ([a-zA-Z]+), it will not be able to wear this item\./
|
||||
|
||||
cattr_reader :per_page
|
||||
@@per_page = 30
|
||||
|
||||
scope :newest, -> {
|
||||
order(arel_table[:created_at].desc) if arel_table[:created_at]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue