Skip to content

Support options/conditions for multiple attributes #2145

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

Closed
wants to merge 1 commit into from
Closed

Support options/conditions for multiple attributes #2145

wants to merge 1 commit into from

Conversation

charlesvallieres
Copy link

@charlesvallieres charlesvallieres commented May 29, 2017

Purpose

Support options/conditions on attributes

attributes :foo, :bar, if: -> { current_user.admin? }

Changes

serializer.rb#attributes

Caveats

Related GitHub issues

We needed this so I built it. While reading contributing.md I started searching for issues and found this PR which is pretty much exactly the same thing : #1714

Since this is +1 year ago and OP didn't respond I thought I would still open a new PR. Feel free to close it if I was wrong in doing so 🙂

Additional helpful information

@mention-bot
Copy link

@charlesvallieres, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bf4, @beauby and @groyoh to be potential reviewers.

@charlesvallieres
Copy link
Author

Closed in favor of #2148

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

Successfully merging this pull request may close these issues.

2 participants