Tuesday
Jan012013

Advice on collecting Fungi to Eat

From a post by FungiJohn at WildAboutBritain:

If you are not 100 percent certain that a fungus is edible then you should not eat it!
If you do collect fungi for consumption take three samples:
  One for yourself
  One for your Doctor
  And another for the Coroner
Tuesday
Jan012013

Ice House

The trees and bushes have been cleared around the ice house in Whiteknights Park and its presence is now obvious to anyone who walks by that way.

For more about this ice house see this post from 2006 and this Flickr set.

The gate on the entrance has been secured and you can no longer get inside.

Photos taken in Whiteknights Park, Reading, UK, on 2012-12-31.

Monday
Dec312012

Moth

From back in mid-summer: what I think is a rather faded burnet companion moth, Euclidia glyphica = Euclidea glyphica (Lepidoptera: Noctuidae).  See here for one I saw a couple of years earlier.

Photo taken in Whiteknights Park, Reading, UK, on 2012-06-20.

Sunday
Dec302012

How to Inhibit Escaping in Rails3 ActionView Custom Helpers

I had bits of code like this scattered throughout my Rails3 views:

  <%= image_tag(thumbnail_image_path(@image.id)) %>

I wanted to enclose each image_tag call in a <div></div> pair to allow styling, so I wrote the following custom helper and placed it in app/helpers/application_helpers.rb:

  def thumbnail_block(image_id)
    "<div>#{image_tag(thumbnail_image_path(image_id))}</div>"
  end

I then replaced the calls to image_tag in my views with calls to thumbnail_block:

  <%= thumbnail_block(@image.id) %>

However, instead of displaying the images, this displayed the HTML code in the browser window.  Rails3 was automatically escaping the string produced by the new custom helper.

A search on Google lead me to this answer by Mike Fisher at StackOverflow and this post by Yehuda Katz at Rails Dispatch.  These gave me the solution: the custom helper needs to mark the string as html_safe before returning it:

  def thumbnail_block(image_id)
    "<div>#{image_tag(thumbnail_image_path(image_id))}</div>".html_safe
  end

Now my images display properly.

Sunday
Dec302012

Pink Fungus

What I think is the asexual form (anamorph) of the fungus Ascocoryne sarcoides growing on a decaying log. 

I took a small sample and it yielded the following small spores (shown at x600): 

These are about 3.5 x 1um which nicely matches the 3-3.5 x 1-2um given for the asexual spores at Wikipedia. The sexual spores are much larger (12-16 x 3-5um).

First photo taken in the Wilderness, Whiteknights Park, Reading, UK, on 2012-12-25.