iterator overrules render in very flat app
Reported by schwabsauce | July 16th, 2008 @ 12:58 PM
In an action in the controller of my very flat app, if I call #each, the set I'm iterating over gets rendered. This happens whether or not a call to render exists anywhere in the action.
Comments and changes to this ticket
-
Michael Klishin (antares) July 16th, 2008 @ 02:49 PM
Could you post your code? It's probably how Merb handles action — anything returned from the action is sent to the client. In Ruby result of last statement in method body is returned, keep this in mind.
-
schwabsauce July 16th, 2008 @ 03:44 PM
With that in mind, it is likely that I just misunderstood how Merb handles rendering. I thought that you could effectively ignore the end of the action by conditionally rendering prematurely.
-
Michael Klishin (antares) July 16th, 2008 @ 03:59 PM
No, Merb has no auto rendering. Just returned string is used. That's the same reason why you have to make sure your action does not return nil which is not valid in rack.
Makes sense?
-
Yehuda Katz (wycats) July 19th, 2008 @ 10:37 PM
- → State changed from new to invalid
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
