-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect back to edit page after using new creator/collection button #2677
Conversation
@@ -204,4 +206,18 @@ def get_creators_and_collections | |||
@creators = policy_scope(Creator) | |||
@collections = policy_scope(Collection) | |||
end | |||
|
|||
def set_returnable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method set_returnable
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
@@ -54,7 +54,12 @@ def edit | |||
def create | |||
authorize Collection | |||
@collection = Collection.create(collection_params) | |||
redirect_to collections_path, notice: t(".success") | |||
if session[:return_after_new] | |||
redirect_to session[:return_after_new] + "?new_collection=#{@collection.to_param}", notice: t(".success") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible unprotected redirect
@@ -52,7 +52,12 @@ def edit | |||
def create | |||
authorize Creator | |||
@creator = Creator.create(creator_params) | |||
redirect_to creators_path, notice: t(".success") | |||
if session[:return_after_new] | |||
redirect_to session[:return_after_new] + "?new_creator=#{@creator.to_param}", notice: t(".success") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible unprotected redirect
Code Climate has analyzed commit 761e9af and detected 5 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 86.8% (0.0% change). View more on Code Climate. |
….79.0@fbe7374 by renovate (#26621) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/manyfold3d/manyfold](https://redirect.github.com/manyfold3d/manyfold) | minor | `0.78.1` -> `0.79.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>manyfold3d/manyfold (ghcr.io/manyfold3d/manyfold)</summary> ### [`v0.79.0`](https://redirect.github.com/manyfold3d/manyfold/releases/tag/v0.79.0) [Compare Source](https://redirect.github.com/manyfold3d/manyfold/compare/v0.78.1...v0.79.0) This release sees the arrival of a long-awaited feature, the ability to upload files into an existing model! Now you can add images, extra files, fixed files, whatever you want. It also comes with improved upload performance, and a load of bugfixes for some issues that have been on the backlog for a long time! #### What's Changed ##### ✨ New Features ✨ - Upload files into existing models by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2686 - Add file type icon to blank previews by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2685 ##### 🐛 Bug Fixes 🐛 - Link tags on model page to list by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2676 - Redirect back to edit page after using new creator/collection button by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2677 - Make "problem" links dark to fix contrast issues. by [@​aneurinprice](https://redirect.github.com/aneurinprice) in [manyfold3d/manyfold#2679 - Fix invisible tag selector border by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2684 - Fix library storage key lookup by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2691 - Remove overflowing text on image carousel buttons by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2692 - Fix bulk actions in advanced admin interface by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2693 - Send logs to stdout by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2694 - Fix redirection when viewing a page that requires login by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2697 - Make sure tag ordering is consistent by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2698 - Fix upload problems caused by Shrine config by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2703 ##### 🛠️ Other Improvements 🛠️ - Improve performance and disk usage during upload processing by [@​Floppy](https://redirect.github.com/Floppy) in [manyfold3d/manyfold#2674 **Full Changelog**: manyfold3d/manyfold@v0.78.1...v0.79.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44OC4wIiwidXBkYXRlZEluVmVyIjoiMzguODguMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJhdXRvbWVyZ2UiLCJ1cGRhdGUvZG9ja2VyL2dlbmVyYWwvbm9uLW1ham9yIl19-->
Resolves #2461