Skip to content

AO3-7389 Use find_by! to throw 404 for non existent skins#5870

Open
jmalark wants to merge 1 commit into
otwcode:masterfrom
jmalark:AO3-7389-preview-nonexistent-skin-to-404
Open

AO3-7389 Use find_by! to throw 404 for non existent skins#5870
jmalark wants to merge 1 commit into
otwcode:masterfrom
jmalark:AO3-7389-preview-nonexistent-skin-to-404

Conversation

@jmalark

@jmalark jmalark commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-7389

Purpose

When a skin doesn't exist, 404

Credit

Jesse Malark he/him

@jmalark jmalark force-pushed the AO3-7389-preview-nonexistent-skin-to-404 branch from b553636 to 339659b Compare June 10, 2026 21:18
@jmalark jmalark force-pushed the AO3-7389-preview-nonexistent-skin-to-404 branch from 339659b to 33f049b Compare June 10, 2026 21:20

@Bilka2 Bilka2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly find_by!, but works just as well :D

Please add an rspec test

# DELETE /skins/1
def destroy
@skin = Skin.find_by(id: params[:id])
@skin = Skin.find(params[:id])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this action use load_skin instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants