Class: Roar::Rails::Responder
- Inherits:
-
ActionController::Responder
- Object
- ActionController::Responder
- Roar::Rails::Responder
- Includes:
- PrepareModel, VersionStrategy
- Defined in:
- lib/roar/rails/responder.rb,
lib/roar/rails/rails3_0_strategy.rb,
lib/roar/rails/rails3_1_strategy.rb,
lib/roar/rails/rails3_2_strategy.rb,
lib/roar/rails/rails4_0_strategy.rb,
lib/roar/rails/rails4_2_strategy.rb,
lib/roar/rails/rails5_0_strategy.rb
Defined Under Namespace
Modules: PrepareModel, VersionStrategy Classes: Response
Instance Method Summary collapse
Methods included from VersionStrategy
Methods included from PrepareModel
Instance Method Details
#display(model, *args) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/roar/rails/responder.rb', line 4 def display(model, *args) if represent_format? handle_lonely_collection!(model) and return super # :represent_items_with model = prepare_model_for(format, model, ) end super(create_response(model), *args) # AC::Responder: this calls controller.render which calls render_to_body which calls renderer[:json] which calls model.to_json. end |