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:
parent
032778eefb
commit
2d86b6d9ae
1 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue