Sha256: 17f2039e969cdd961ba4ed2389918c305741515503736715b01b408a4f72270f
Contents?: true
Size: 402 Bytes
Versions: 21
Compression:
Stored size: 402 Bytes
Contents
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
Version data entries
21 entries across 21 versions & 4 rubygems