mirror of
https://github.com/snibox/snibox.git
synced 2026-04-25 15:56:04 +03:00
[PR #58] Add the possibility to add multiple labels for one snippet #75
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/snibox#75
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/snibox/snibox/pull/58
Author: @annabplr
Created: 8/19/2019
Status: 🔄 Open
Base:
master← Head:pr/add-muliple-labels📝 Commits (2)
d00c4dbadd the possibility to add multiple labels for one snippet3ead610add gemfile.lock📊 Changes
29 files changed (+10206 additions, -77 deletions)
View changed files
📝
Gemfile(+1 -1)📝
Gemfile.lock(+3 -3)📝
app/controllers/api/v1/data_controller.rb(+1 -1)📝
app/controllers/api/v1/snippets_controller.rb(+37 -5)📝
app/javascript/snibox/components/SearchBox.vue(+5 -6)📝
app/javascript/snibox/components/SnippetItem.vue(+1 -1)📝
app/javascript/snibox/components/Snippets.vue(+4 -1)📝
app/javascript/snibox/components/snippet/Form.vue(+4 -3)📝
app/javascript/snibox/components/snippet/Show.vue(+8 -1)📝
app/javascript/snibox/mixins/data_helpers.js(+3 -0)📝
app/javascript/snibox/mixins/snippets_builder.js(+2 -2)📝
app/javascript/snibox/store/getters.js(+1 -1)📝
app/javascript/snibox/store/helpers.js(+34 -21)📝
app/javascript/styles/snibox/components/_card.scss(+16 -0)📝
app/models/label.rb(+2 -1)➕
app/models/labeling.rb(+5 -0)📝
app/models/snippet.rb(+4 -3)📝
app/serializers/snippet_serializer.rb(+3 -3)➕
db/migrate/20190722064514_create_labelings.rb(+10 -0)➕
db/migrate/20190722070023_remove_label_id_from_snippet.rb(+11 -0)...and 9 more files
📄 Description
This PR adds the possibility to add multiple labels for one snippet, as requested in this old issue.
A new table (Labeling) has been added to allow the has_many / has_many relationship between Label and Snippet.
Labels should be separated by a comma.
Tests have been edited to fit those changes and one has been added, to check if 2 labels separated by a comma are saved as 2 labels.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.