Tags_Multi_Tenant v0.4.1 Tags_Multi_Tenant View Source
Documentation for Tags_Multi_Tenant. Tags_Multi_Tenant allows you to manage tags associated to your records.
Please read README.md to get more info about how to use that package.
Link to this section Summary
Functions
Get a persisted struct and inserts a new tag associated to this struct for a specific context
Get a persisted struct and removes the tag association for a specific context
It searchs the associated tags for a specific context
Given a tag, module and context (‘tag’ by default), will find all the module resources associated to the given tag
The same than tagged_with/3 but returns the query instead of db results
Link to this section Types
Link to this section Functions
Get a persisted struct and inserts a new tag associated to this struct for a specific context.
You can pass a tag or a list of tags.
In case the tag would be duplicated nothing will happen.
It returns the struct with a new entry for the given context.
Get a persisted struct and removes the tag association for a specific context.
In case the association doesn’t exist nothing will happen.
In the same way that add/3 it returns a struct
It searchs the associated tags for a specific context.
You can pass as first argument an struct or a module (phoenix model)
- With a struct: it returns the list of tags associated to that struct and context.
- With a module: it returns all the tags associated to one module and context.
Given a tag, module and context (‘tag’ by default), will find all the module resources associated to the given tag.
You can pass a simple tag or a list of tags.
The same than tagged_with/3 but returns the query instead of db results.
The purpose of this function is allow you to include it in your filter flow or perform actions like paginate the results.