active_model_serializers

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

Ruby

ActiveModel::Serializer implementation and Rails hooks

ActiveModelSerializers::Deprecate.deprecate

Simple deprecation method that deprecates +name+ by wrapping it up
in a dummy method. It warns on each call to the dummy method
telling the user of +replacement+ (unless +replacement+ is :none) that it is planned to go away.

Source | Google | Stack overflow

Edit

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

cd active_model_serializers

open lib/active_model_serializers/deprecate.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveModelSerializers--Deprecate-deprecate-for-pr


# Commit to git

git add lib/active_model_serializers/deprecate.rbgit commit -m "better docs for ActiveModelSerializers::Deprecate.deprecate"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-ActiveModelSerializers--Deprecate-deprecate-for-pr

hub pull-request


# Celebrate!