Home > include_in_json

include_in_json

Include_in_json is a project mainly written in Ruby, based on the MIT license.

Include custom methods in Rails 3 JSON responses

IncludeInJson

IncludeInJson makes it easy to add extra methods to JSON responses in Rails 3.

Example

class Project < ActiveRecord::Base
  include_in_json :margin

  def margin
    profit / value
  end
end

Copyright (c) 2011 Nick Morgan, released under the MIT license