Skip to content
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

Remove key:value features of UserTag #1417

Closed
jywarren opened this issue May 11, 2017 · 1 comment
Closed

Remove key:value features of UserTag #1417

jywarren opened this issue May 11, 2017 · 1 comment
Assignees
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration

Comments

@jywarren
Copy link
Member

jywarren commented May 11, 2017

This is a complex issue that needs to be broken up into discrete tasks.


The UserTag system is nice - and we need it -- but it should work more like NodeTag:

https://github.com/publiclab/plots2/blob/master/app/models/user_tag.rb

https://github.com/publiclab/plots2/blob/master/app/models/node_tag.rb

NodeTag links Nodes to Tags. Tag stores tag names as strings, and each is unique (whereas NodeTag links a Tag to many Nodes).

That is, Tag has just arbitrary strings as its 'name' -- stored together, like key:value -- or for example activity:kite-mapping.

So we'd have to change a bunch of things, mostly in the User Tag controller:

https://github.com/publiclab/plots2/blob/master/app/controllers/user_tags_controller.rb#L23

And in the UserTag model (above). We can look at the tag controller a bit, although that's too complex and we need to simplify it:

https://github.com/publiclab/plots2/blob/master/app/controllers/tag_controller.rb

@jywarren jywarren added the break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration label May 11, 2017
@jywarren jywarren self-assigned this May 11, 2017
@jywarren
Copy link
Member Author

jywarren commented Aug 3, 2017

This is complete in ; it now works with: #1494

UserTag.new(uid: user.id, value: "skill:#{value}")

@jywarren jywarren closed this as completed Aug 3, 2017
@jywarren jywarren added this to the Deprecating Old Features milestone Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration
Projects
None yet
Development

No branches or pull requests

1 participant