This project is archived and is in readonly mode.

#5508 ✓wontfix
Lars Kuhnt

OpenStruct objects can no longer be used in form helpers

Reported by Lars Kuhnt | August 31st, 2010 @ 09:04 AM


with rails 3 it is no longer possible to use OpenStruct objects as flexible models in form helpers.

For example:

<%= form_for, :url => notifications_path do |f| %>
  <%= f.text_field :message %>
<% end %>

raises the following error:

Model OpenStruct does not respond to message

I always liked the possibility to use OpenStruct objects in form helpers.


Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>