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

Specifing the scope that another mapping is going to use. #14

Open
vjustov opened this issue Oct 13, 2015 · 0 comments
Open

Specifing the scope that another mapping is going to use. #14

vjustov opened this issue Oct 13, 2015 · 0 comments

Comments

@vjustov
Copy link

vjustov commented Oct 13, 2015

Is there a way to specify a scope that another mapping is gonna use? something like:

class UserMapping
  include Kartograph::DSL

  kartograph do
    mapping User
    property :id, scopes: [:read]
    property :comments, scopes: [:read], plural: true, include: [CommentMapping, :update]
  end
end

class CommentMapping
  include Kartograph::DSL

  kartograph do
    mapping Comment
    property :id, scopes: [:read]
    property :text, scopes: [:update]
  end
end
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

1 participant