TODO: one-line summary of your gem
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
to_json_fix.gemspec

README.rdoc

to_json_fix

class Time
  def to_json(*)
    super nil
  end
end

class Date
  def to_json(*)
    super nil
  end
end

class Symbol
  def to_json(*)
    to_s.to_json
  end
end

if defined?(ActiveSupport::HashWithIndifferentAccess)
  class ActiveSupport::HashWithIndifferentAccess
    def to_json(*)
      to_hash.to_json
    end
  end
end

if defined?(ActiveRecord::Base)
  class ActiveRecord::Base
    def to_json(*args)
      super nil
    end
  end
end

Copyright

Copyright © 2010 Seamus Abshere. See LICENSE for details.