LessonPlanet/active_model_serializers-cancan — pull request #2 by jrust (2013-05-24 21:43:31+00:00)
Title: Add abilities helper that serailzes cancan permissions

As discussed in #1 this PR adds a new helper method to ActiveModel::Serializer objects. I didn't add it to the meta because permissions can be dependent on the actual object being serialized. I did, however, make it so only one attribute, called abilities, is added to the serialized hash. This should make it easy for various JS frameworks to have a single point of entry for creating an interface to the ability information. The README changes show examples.