Entries from December 1, 2012 - December 31, 2012

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.

Saturday
Dec292012

Toothed Crust Fungus

A toothed crust fungus, probably Radulomyces molaris, growing on the underside of a dead branch on a still-living oak tree (Quercus sp).

This is an older patch, dried out and cracked, from nearer the base of the branch.  It reminds me of the top of a lemon meringue pie.

And this is a younger patch, further away of the base of the branch.

I collected part of this patch and it yielded the following spores (shown at x600):

Given the image width of 86um these are about 8 x 5.5um, which is at the lower end of the range 8.3-11 x 5.5-7um given at Botany.cz.  (I think some of the spores in the above image might be pointing towards the viewer in which case my estimate of their longest dimension might be an under-estimate.)

First three photos taken in Whiteknights Park, Reading, UK, on 2012-12-23, 2012-12-18, and 2012-12-23, respectively.   The sample which produced the spores was collected from the same place on 2012-12-23.

Friday
Dec282012

Crust Fungus

A white crust fungus, probably Byssomerulius corium, on a fallen birch branch (Betula sp).

The following image shows the meruloid underside of a fragment growing on a thin twig:

This fragment yielded the following spores (shown at x600):

With an image width of 86um, these spores are about 5.5 x 2.5um, which is consistent with the values in the region of 5-7 x 2.5-3.5um given in the descriptions listed at Mycobank.

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