lib/roar/rails/controller_additions.rb in roar-rails-0.1.0 vs lib/roar/rails/controller_additions.rb in roar-rails-0.1.1

- old
+ new

@@ -49,9 +49,18 @@ def incoming_string request.body.read end + def render_to_body(options) + if res = options[formats.first] and res.is_a?(Roar::Rails::Responder::Response) + response.content_type = res.content_type + return res.body + end + + super + end + class RepresenterComputer < Hash def add(format, opts) # FIXME: use controller_path here as well! # by pre-computing the representer name we allow "one-step inheritance": if B doesn't call ::represents it "inherits" A's settings. \ No newline at end of file