active_model_serializers

https://github.com/rails-api/active_model_serializers

Ruby

ActiveModel::Serializer implementation and Rails hooks

ActiveModel::Serializer::Lint::Tests#test_model_name

Passes if the object's class responds to <tt>model_name</tt> and if it
is in an instance of +ActiveModel::Name+.
Fails otherwise.

<tt>model_name</tt> returns an ActiveModel::Name instance.
It is used by the serializer to identify the object's type.
It is not required unless caching is enabled.

Source | Google | Stack overflow

Edit

git clone [email protected]:rails-api/active_model_serializers.git

cd active_model_serializers

open lib/active_model/serializer/lint.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveModel--Serializer--Lint--Tests-test_model_name-for-pr


# Commit to git

git add lib/active_model/serializer/lint.rbgit commit -m "better docs for ActiveModel::Serializer::Lint::Tests#test_model_name"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActiveModel--Serializer--Lint--Tests-test_model_name-for-pr

hub pull-request


# Celebrate!