I was able to perform what I'm talking about in an initializer, maybe it can
help seeing the big picture:
```ruby
ActionController::Responder.class_eval do
def to_format
if has_errors?
api_behavior(nil) and return
end
controller.response.status = :created if post? && ! has_errors?
default_render
rescue ActionView::MissingTemplate => e
api_behavior(e)
end
end
```
Now I understand a lot better Rails view stack.
As for my problem, the culprit is this line in mime_responds.rb:
```
collector = Collector.new { default_render }
```
which calls the default view without options (I guess this is a
functionality and not a bug since it's name is "default_render").
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/WvSMC1eYr2IJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.