I had one response_for that didn't seem to work on rails edge.
The error was "Template answers/create.erb not found".
The response_for block was something like this:
response_for :create do |format|
format.html { render "questions/index" }
end
It turns out that there was an error in the view questions/index and
response_for was caching that in like 140 of response_for.rb:
http://github.com/ianwhite/response_for/blob/bcc544a726990f851051f09bb8799e69d0e34f46/lib/ardes/response_for.rb#L140
Rescuing the error like below (instead of using the single line
rescue) seemed to fix it for me:
begin
respond_to do |responder|
action_responses.each {|response| instance_exec(responder,
&response) }
end
rescue Responder::NoResponsesError
end
I'm not turning this into a patch because I have no clue what's going
on there. This ruby syntax subtlety is escaping me :).
Also, at line 159, shouldn't that be raise NoResponsesError instead of
raise NoResponseError?:
http://github.com/ianwhite/response_for/blob/bcc544a726990f851051f09bb8799e69d0e34f46/lib/ardes/response_for.rb#L159
Thanks,
Cristi
--
Cristi Balan
http://rubber.ducki.es
http://evil.che.lu
You can check the progress here: http://ianwhite.lighthouseapp.com/projects/10607-response_for/tickets/1-response_for-swallows-template-errors#ticket-1-2
Cheers,
Ian