Entries by Tristram Brelstaff (3025)

Monday
Nov192012

How to set Query Parameters in Rails form_for URLs

In Rails 3.2.8, the following code fragment:

  <%= form_for @resource, url: {p: '123'} do |f| %>

generates this HTML:

  <form accept-charset="UTF-8" action="/resource/new?p=123" ... >

Multiple query parameters also work:

  <%= form_for @resource, url: {p: '123', q: 'ABC'} do |f| %>

gives:

  <form accept-charset="UTF-8" action="/resource/new?p=123&q=ABC" ... >
Monday
Nov192012

Fungus

A yellow stagshorn fungus, probably Calocera cornea, growing on a decaying tree stump.

Photo taken in the Wilderness, Whiteknights Park, Reading, UK, on 2012-11-08.

Sunday
Nov182012

Tortoise Beetle

From back in May: a tortoise beetle, probably Cassida vibex (Coleoptera: Chrysomelidae) judging by the extent of the brown mark on its back.  It was on a knapweed (Centaurea sp).

The more common Cassida rubiginosa is similar but has a only a small brown mark, if any.

Photos taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2012-05-02.

Saturday
Nov172012

Lacebug

From over two years back: a lace bug, probably Tingis ampliata (Hemiptera: Tingidae), on creeping thistle (Cirsium arvensis).

Photo taken in Whiteknights Park, Reading, UK, on 2010-08-15.

Friday
Nov162012

Conopid Fly

From back in midsummer: Sicus ferrugineus (Diptera: Conopidae), a parasite of bumble bees.

Photo taken in the Wilderness, Whiteknights Park, Reading, UK, on 2012-07-28.