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 […]
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.
By default, Rubys heredocs are interpreted as double-quoted strings, that is #{something} is evaluated, \r turns into newline and so forth. You can change this behaviour by single quoting the heredoc identifier like so: s = <<-‘SINGLE_QUOTED’ #{i’m not interpreted} SINGLE_QUOTEDs = <<-‘SINGLE_QUOTED’ #{i’m not interpreted} SINGLE_QUOTED
Regarding my question on twitter about completely disabling the creation of stacktrace.log from a Grails application in production mode, here is my answer: environments { production { log4j = { appenders { null name:’stacktrace’ } } } development { } }environments { production { log4j = { appenders { null name:’stacktrace’ } } } development […]
Ruby on Rails I18n infrastructure did a great job to internationalization in Rails applications. Most things work right out of the box. Daily Fratze is fully internationalized and i wanted to use ordinal day numbers in the English version. Pity, there is no template for strftime that works that way. As i already hat monkey […]