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
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb
nbudin-castronaut-0.7.5 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/pkg/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb
factorylabs-castronaut-0.7.5 vendor/activesupport/lib/active_support/json/encoders/enumerable.rb
activesupport-2.2.3 lib/active_support/json/encoders/enumerable.rb
webroar-0.2.2 src/admin_panel/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb
activesupport-2.1.0 lib/active_support/json/encoders/enumerable.rb
activesupport-2.3.2 lib/active_support/json/encoders/enumerable.rb
activesupport-2.2.2 lib/active_support/json/encoders/enumerable.rb
activesupport-2.1.1 lib/active_support/json/encoders/enumerable.rb
activesupport-2.1.2 lib/active_support/json/encoders/enumerable.rb
antfarm-0.3.0 rails/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb
antfarm-0.4.0 rails/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb
mack-active_record-0.8.2 lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb
mack-facets-0.8.3.1 lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb
mack-facets-0.8.3 lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb
radiant-0.7.0 vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb