1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #430 from masterkain/fix_rails_respond_with

Make Rails' respond_with play nice with to_json.
This commit is contained in:
Wesley Beary 2011-07-15 15:33:12 -07:00
commit 843cbc37ac
2 changed files with 4 additions and 4 deletions

View file

@ -115,9 +115,9 @@ module Fog
Formatador.display_table(self.map {|instance| instance.attributes}, attributes)
end
def to_json
def to_json(options = {})
require 'json'
self.map {|member| member.attributes}.to_json
self.map {|member| member.attributes}.to_json(options)
end
private

View file

@ -37,9 +37,9 @@ module Fog
self
end
def to_json
def to_json(options = {})
require 'json'
attributes.to_json
attributes.to_json(options)
end
def wait_for(timeout=Fog.timeout, interval=1, &block)