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

.tags filtered per relation? #7

Open
ciphersys opened this issue Apr 21, 2013 · 2 comments
Open

.tags filtered per relation? #7

ciphersys opened this issue Apr 21, 2013 · 2 comments

Comments

@ciphersys
Copy link

If I have a model like

class Blog
include Mongoid::Document
include Mongoid::TaggableWithContext

embeds_many :posts

class Post
include Mongoid::Document
include Mongoid::TaggableWithContext

embedded_in :blog

I then want to be able to pull up .tags and .tags_with_weight like

Blog.find_by(id: params[:id]).posts.tags

or maybe

Post.where(blog: someblog).tags # if using has_many / belongs_to relation syntax

The reason is I want to provide a tag cloud / weighting for a given Blog, not across every single Post.

How might this be implemented?

@johnnyshields
Copy link
Collaborator

@ciphersys I require this and am working on implementing it.

@johnnyshields
Copy link
Collaborator

@ciphersys please review API for new version in issue #10

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

No branches or pull requests

2 participants