Taglet v0.6.0 Taglet View Source
Documentation for Taglet. Taglet 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
Rename the tag name by a new one. This actions has effect only in the context specificied
It searchs the associated tags for a specific context
It works exactly like tag_list but return a queryable
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
Rename the tag name by a new one. This actions has effect only in the context specificied.
If the old_tag does not exist return nil.
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.
tag_list_queryable(taggable, context) :: Ecto.Queryable.t
It works exactly like tag_list but return a queryable
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.