Sha256: d8ac41728a710240306f34eec34294c6bad5e15a28e3c5958266c258258f4c85

Contents?: true

Size: 411 Bytes

Versions: 42

Compression:

Stored size: 411 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

42 entries across 41 versions & 14 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
p8-castronaut-0.6.1.1 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.6.0 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.6.1 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.7.4 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
relevance-castronaut-0.7.5 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb