Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
AO3-4466 Reduce the one call to skins per page #2332
Conversation
zz9pzza
added some commits
Jan 28, 2016
houndci-bot
reviewed
Jan 29, 2016
| @@ -51,7 +53,8 @@ def self.guest_downloading_off? | ||
| self.first ? self.first.guest_downloading_off? : false | ||
| end | ||
| def self.default_skin | ||
| - self.first ? (self.first.default_skin_id ? self.first.default_skin : Skin.default) : Skin.default | ||
| + default_skin=Rails.cache.fetch(default_skin_cache_key){Skin.default} |
houndci-bot
Jan 29, 2016
Surrounding space missing for operator =.
Space missing to the left of {.
Space missing inside {.
Space missing inside }.
CristinaRO
Feb 7, 2016
Member
@zz9pzza: would you obey the Hound's comments with regard to spacing, please? The nested ternary was already there so I guess we can ignore it, but the spacing is really bad.
houndci-bot
reviewed
Jan 29, 2016
| @@ -51,7 +53,8 @@ def self.guest_downloading_off? | ||
| self.first ? self.first.guest_downloading_off? : false | ||
| end | ||
| def self.default_skin | ||
| - self.first ? (self.first.default_skin_id ? self.first.default_skin : Skin.default) : Skin.default | ||
| + default_skin=Rails.cache.fetch(default_skin_cache_key){Skin.default} | ||
| + self.first ? (self.first.default_skin_id ? self.first.default_skin : default_skin) : default_skin |
houndci-bot
Jan 29, 2016
Ternary operators must not be nested. Prefer if/else constructs instead.
Redundant self detected.
CristinaRO
added
the
Reviewed: Needs Coder Action
label
Feb 7, 2016
houndci-bot
reviewed
Feb 7, 2016
| @@ -51,7 +53,8 @@ def self.guest_downloading_off? | ||
| self.first ? self.first.guest_downloading_off? : false | ||
| end | ||
| def self.default_skin | ||
| - self.first ? (self.first.default_skin_id ? self.first.default_skin : Skin.default) : Skin.default | ||
| + default_skin = Rails.cache.fetch( default_skin_cache_key ){ Skin.default } |
houndci-bot
reviewed
Feb 7, 2016
| @@ -51,7 +53,8 @@ def self.guest_downloading_off? | ||
| self.first ? self.first.guest_downloading_off? : false | ||
| end | ||
| def self.default_skin | ||
| - self.first ? (self.first.default_skin_id ? self.first.default_skin : Skin.default) : Skin.default | ||
| + default_skin = Rails.cache.fetch( default_skin_cache_key ){ Skin.default } | ||
| + self.first ? ( self.first.default_skin_id ? self.first.default_skin : default_skin ) : default_skin |
houndci-bot
Feb 7, 2016
Ternary operators must not be nested. Prefer if/else constructs instead.
Redundant self detected.
Space inside parentheses detected.
zz9pzza commentedJan 29, 2016
https://otwarchive.atlassian.net/browse/AO3-4466