U bekijkt nu de Engelstalige versie van onze website. Klik hier om de site in het Nederlands te bekijken.

Blog posts about How-tos

Rails tip: display association validation errors on fields

Kevin's picture

In Ruby on Rails it is common to use a (collection) select field to set the value for a belongs_to association. However, using Rails' default form builder, validation errors on the association field are usually not correctly displayed. They are either shown on the form's label or the field, while you usually want both. In this blogpost I show a simple patch to fix this problem and make sure validation errors for associations are shown both on the label and the field itself.

Temperature monitoring with the Raspberry Pi

Christiaan's picture

For a catering industry related project, I wanted to create a simple web page which shows a log of the temperatures of a set of refrigerators and freezers. So I needed to create a small system that reads some temperature sensors and sends this to a database for further processing. I had a Raspberry Pi lying around which I didn't actually use, so I created a simple setup with the Pi and multiple DS18B20 temperature sensors.