The default behavior for quite a long time was :hard_breaks in the textilize helper method in rails. Hard Breaks means: All line breaks are turned into <br />’s. Somebody changed the textilize helper in “actionpack-2.3.4/lib/action_view/helpers/text_helper.rb” in 2.3.4 and added the ability to pass some options but broke the default behavior here: def textilize(text, *options) options […]
Just a quick reminder: To revert a complete working copy or a single file use: svn merge -rHEAD:PREV . # or svn merge -rHEAD:PREV path/to/file svn commit -m "reverted"svn merge -rHEAD:PREV . # or svn merge -rHEAD:PREV path/to/file svn commit -m "reverted"
You can use RAILS_DEFAULT_LOGGER.log "foobar" # or Rails.logger.log "blah"RAILS_DEFAULT_LOGGER.log "foobar" # or Rails.logger.log "blah" outside a controller for logging.
I recently presented biking.michael-simons.eu, a Sinatra based application written in Ruby. Its main purpose for me is to keep track of my milage in 2009. Although the application is completely self containing it has some nice features: Simple setup The application is simple and i didn’t want to use a “big” database like PostgreSQL or […]
The following statement "foo baz".replaceAll("baz","$bar");"foo baz".replaceAll("baz","$bar"); will present you an java.lang.IllegalArgumentException: Illegal group reference exception as the replacement string can contain backreferences to the search pattern as stated in Mather#replaceAll: This method first resets this matcher. It then scans the input sequence looking for matches of the pattern. Characters that are not part of any […]