Skip to content

Rename Serializer subclasses to Serialization #1137

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

Conversation

bf4
Copy link
Member

@bf4 bf4 commented Sep 11, 2015

@@ -156,7 +156,7 @@ def self.digest_caller_file(caller_line)

def self.get_serializer_for(klass)
serializers_cache.fetch_or_store(klass) do
serializer_class_name = "#{klass.name}Serializer"
serializer_class_name = "#{klass.name}Serialization"
Copy link
Member Author

Choose a reason for hiding this comment

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

hmm

@beauby
Copy link
Contributor

beauby commented Sep 23, 2015

I am not too sure about this change personally. I like that in a rails project I have my controllers in app/controllers/ and my serializers in app/serializers. It would be weird to have "serializations" in app/serializers and even weirder to have them in app/serializations.
I agree the name "serializer" is not perfect, but at this point I'm afraid we're kinda stuck with it.

@NullVoxPopuli
Copy link
Contributor

I don't like the name change. Serializer leads us to believe that the class is something that can serialize. Serialization makes it sound like it is data that is already serialized, imo.

@beauby
Copy link
Contributor

beauby commented Sep 23, 2015

@NullVoxPopuli Thing is, our "serializers" do not actually "serialize" anything, they merely present the objects in an adapter-friendly way.

@NullVoxPopuli
Copy link
Contributor

So then I guess Hasherizer may be more appropriate? :-)

@beauby
Copy link
Contributor

beauby commented Sep 23, 2015

Or SerializationPresenter, but in any case, the project is called ActiveModel::Serializers so we kinda have to stick with Serializers in my opinion.

@NullVoxPopuli
Copy link
Contributor

how strongly does rails feel about "Serialization"? it looks like they just have the one module https://github.com/rails/rails/blob/4-2-stable/activemodel/lib/active_model/serialization.rb

@bf4
Copy link
Member Author

bf4 commented Oct 15, 2015

This has been rejected...

@bf4 bf4 closed this Oct 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants