1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Move Model test class inside RenderersApiController namespace

This commit is contained in:
Santiago Pastorino 2015-04-15 15:50:19 -03:00
parent 032778eefb
commit 2d86b6d9ae

View file

@ -1,17 +1,17 @@
require 'abstract_unit'
require 'active_support/core_ext/hash/conversions'
class Model
def to_json(options = {})
{ :a => 'b' }.to_json(options)
end
def to_xml(options = {})
{ :a => 'b' }.to_xml(options)
end
end
class RenderersApiController < ActionController::API
class Model
def to_json(options = {})
{ :a => 'b' }.to_json(options)
end
def to_xml(options = {})
{ :a => 'b' }.to_xml(options)
end
end
def one
render :json => Model.new
end