Skip to content
This repository
tree: 7c3581cba2
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 13 lines (12 sloc) 0.402 kb
1 2 3 4 5 6 7 8 9 10 11 12
module Enumerable
  # Returns a JSON string representing the enumerable. Any +options+
  # given will be passed on to its elements. For example:
  #
  # users = User.find(:all)
  # users.to_json(:only => :name)
  #
  # will pass the <tt>:only => :name</tt> option to each user.
  def to_json(options = {}) #:nodoc:
    "[#{map { |value| ActiveSupport::JSON.encode(value, options) } * ', '}]"
  end
end
Something went wrong with that request. Please try again.