Created
December 23, 2011 09:12
-
-
Save chakrit/1513680 to your computer and use it in GitHub Desktop.
This file contains 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(w) | |
"{ 'test': true }" | |
end | |
end | |
def ping | |
respond_with(Pong.new) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment