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:
commit
843cbc37ac
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue