Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Rails plugin for setting ActiveRecord::Serialization::Serializer options at the class level.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 init.rb
README
Serialization Options
===========

This is a simple plugin which allows you to avoid specifying serialization
options every time you call record.to_json, record.to_xml etc. This is done by
specifying the options at the class level.

Example
=======

class Post < ActiveRecord::Base
  self.serialization_options = {
    :only => %w(id created_at updated_at),
  }
end

Post.first.to_json

Copyright (c) 2008 Nathan de Vries (http://www.atnan.com), released under the MIT license
Something went wrong with that request. Please try again.