response_for swallows template errors
-
Ian White
- State changed from new to open
Criuti Balan wrote
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" } endIt 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/respo...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 endI'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/respo... -
Ian White
(from [7c899c00eccc6ee810dc615490863a6f0a37b521]) Added spec for when an error occurs in a template (currently failing) [#1] http://github.com/ianwhite/respo...
-
Ian White
- State changed from open to resolved
(from [89356bd5730e00a070addfe0789f33a49aff3b78]) Remove monkey patch of Reponder, as it's no longer necessary [#1 state:resolved] http://github.com/ianwhite/respo...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.