ruby - Having to call "render :layout => false" to correctly render js.erb template in Rails 2.3.3 -
I am running the latest Rail 2-3-Stable branch (currently 2.3.3).
I am using JQuery for the 'create' request of an 'AJAX' request, in which I have the following block:
response_to do | Format | Format.js end
I have created create.js.erb
and to check this action, I've added the following single line: < / P>
alerts ('hello');
The request enters the format.js block in the correct form, but attempts to present the response layout. This is my log:
22 July 20:44:27 [297] Notice: the dedication of the template within the layout / application July 22 20:44:27 [297] Information : Rendering contact / create
If I make changes to my response_to
, then it works:
response_to Do Format | Format.js {Render: Layout = & gt; False} end
Is this expected behavior or is it a bug in the railways? I have thought of this fact that I am providing JS response, false will be enough to set the layout. Ajax's memory on rail books is that it was standard if the expected versions of the railways were not expected to be expected.
The following tickets show that some versions are bugged back, as well as a way to define behavior as default.
Sadly, what are the subsequent changes that this obsolete has not been explained in the last comment.
Comments
Post a Comment