Module: JsonSerialize

Extended by:
ActiveSupport::Concern
Defined in:
lib/json_serialize.rb

Overview

Adds the #json_serialize method to @ActiveRecord@ objects.

Examples:

Basic usage

class MyModel < ActiveRecord::Base
  include JsonSerialize
  json_serialize :some_field, another_field: "Default value"
end

Defined Under Namespace

Modules: ClassMethods