WordPress comment spam almost worth saving to use on student papers if I were still teaching:
Comment:
Together with the whole thing that appears to be developing within this particular subject matter, many of your perspectives are rather refreshing. On the other hand, I appologize, because I can not subscribe to your entire plan, all be it refreshing none the less. It appears to everybody that your comments are not completely justified and in reality you are generally yourself not even completely confident of the assertion. In any case I did enjoy reading through it.
December 10, 2010 by David Furber in
Uncategorized
Lesson learned today:
If you have a Firefox extension and you use the toolbarbutton element.
In Windows 7 you can only use list-style-image to style it. Background color, -moz-linear-gradient, and -moz-border radius don’t do anything, plus you get a special fancy hover effect.
I ended up converting the toolbarbutton tags to a tags and moving on with life. Had to convert oncommand to onclick and say goodbye to the tooltiptext.
I just spent a few minutes in la-la-land trying to figure out when an instance variable assigned in the controller stopped showing up in the view, despite all evidence that it was getting set correctly in the controller.
The answer was that there were several conditions that would case an update action to render :action => :edit. I was being clever by moving them to the top of the function, however then I was assigning that instance variable AFTER I had called render.
Lesson learned: Although controller code keeps on executing after you call render (unless you follow it with an explicit return), no more instance variables will get passed on to the view. It is obvious now why: a Rails request executes a given action in a controller. The controller executes before filters, executes the action, yields to whatever template has been defined (or searches for the automatic one if render has not been called). The view then yields back to the controller, which executes its after filters then back up through the middleware and out the door. (Ever notice if you try to yield between methods in a controller it wets the bed?) If you render before you’re done doing what you need to do, the controller has initialized the view template but keeps on executing controller code before yielding to it.