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

Serializer: add support for passing serializer as string #108

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

yosiat
Copy link
Owner

@yosiat yosiat commented Sep 21, 2021

No description provided.

@yosiat yosiat merged commit cefad2f into master Feb 14, 2022
@yosiat yosiat deleted the pass-serializer-string branch February 14, 2022 11:08
@@ -75,7 +75,7 @@ def method_added(method)

def has_one(name, options = {})
serializer_const = options[:serializer]
serializer_const = Panko::SerializerResolver.resolve(name.to_s, self) if serializer_const.nil?
serializer_const = Panko::SerializerResolver.resolve(name.to_s, self) if serializer_const.nil? || serializer_const.kind_of?(String)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosiat Is there a reason why you added support in the has_one method, but not the has_many method?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryoung umm don't think there was a specific reason..

want to submit a PR for that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I can do that.

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.

None yet

2 participants