#151 √ invalid
Matthijs Langenberg

[PATCH] [SPEC] form_for bound to non-AR or non-DM objects

Reported by Matthijs Langenberg | August 28th, 2008 @ 04:29 PM | in 1.0

Currently, the following fails:


class Post
  attr_reader :body
end

form_for(Post.new) do
  text_area :body
end

This is because Post#errors and Post#new_record? do not exists.

In my opinion, the bound helpers should be usable with DM, ActiveRecord, but also other kinds of objects. Which may or may not respond to either 'errors' or 'new_record?'.

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

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

Shared Ticket Bins