Skip to content

New feature added to allow admin users to merge articles#29

Open
trowbrsa wants to merge 29 commits intoAda-C4:masterfrom
trowbrsa:mergefeature
Open

New feature added to allow admin users to merge articles#29
trowbrsa wants to merge 29 commits intoAda-C4:masterfrom
trowbrsa:mergefeature

Conversation

@trowbrsa
Copy link
Copy Markdown

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!

trowbrsa added 28 commits March 28, 2016 14:52
…ctly for new categories, updated indentation
…tent and admin can see 'Merge Articles' option
end

def merge
if current_user.admin?
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Great suggestion - updated it so that a non-admin gets a flash notice and then is redirected to the index page.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants