Created
December 23, 2011 09:13
-
-
Save chakrit/1513684 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApiController < ApplicationController | |
respond_to :json | |
class Pong < Object | |
attr_accessor :pong | |
def initialize | |
@pong = true | |
end | |
def to_json(x) | |
"{ 'test': #{pong} }" | |
end | |
end | |
def ping | |
render json: Pong.new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment