New feature added to allow admin users to merge articles#29
Open
trowbrsa wants to merge 29 commits intoAda-C4:masterfrom
Open
New feature added to allow admin users to merge articles#29trowbrsa wants to merge 29 commits intoAda-C4:masterfrom
trowbrsa wants to merge 29 commits intoAda-C4:masterfrom
Conversation
…to an individual category's edit page
…ctly for new categories, updated indentation
…sting visibility of merge button
…tent and admin can see 'Merge Articles' option
| end | ||
|
|
||
| def merge | ||
| if current_user.admin? |
There was a problem hiding this comment.
Should something happen if the user is not an admin? I know it might not show up on the view, but someone could still potentially hit the URL anyway.
Author
There was a problem hiding this comment.
Great suggestion - updated it so that a non-admin gets a flash notice and then is redirected to the index page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes a feature that allows admin users to merge together two articles. This is only visible to logged-in admins, and the feature does not allow you to attempt to merge the same two articles or merge an article that doesn't exist.
Please note that this is still a draft feature. I still have more cucumber tests to write to ensure that everything is working correctly. I also want to improve the user experience in v2. Specifically, I want to make sure that a green 'success' notification that pops up for users when two articles are successfully merged (currently it is a red 'error' notification. Additionally, I think a more improved user experience would redirect users back to the 'edit' page after they merge (they are currently redirected to the index). Lastly, I want to give admins the option of selecting which author and title they want to assign to the merged post (currently it defaults to the post for which they select the merge(.
Thanks for any feedback!