This project is archived and is in readonly mode.
Using form_for with ActiveResource broken in edge
-
Gaël Deest
Adding:
def persisted? return !new? endto activeresource/lib/active_resource/base.rb does the trick. I don't know if it's safe to remove new_record? entirely.
-
Gaël Deest
- Tag changed from activeresource, edge to activeresource, edge, patch
Here is a cumulated patch for this issue and the one raised by ticket #4155 ActiveResource generates an error for a form_for attribute.
Please tell me if there is any problem with this patch.
-
Repository
- State changed from new to resolved
(from [753304bd113d7524f6d48d220483a2723c534557]) Makes ActiveResource work with form_for: - Adds a
build' method that can be used instead ofnew' to load a new, unsaved resource from the remote site, filled with the correct default values. - Adds apersisted?' method that simply returns the opposite value than thenew?' method. [#4222 Using form_for with ActiveResource broken in edge state:resolved] [#4155 ActiveResource generates an error for a form_for attribute state:resolved]Signed-off-by: wycats wycats@gmail.com
http://github.com/rails/rails/commit/753304bd113d7524f6d48d220483a2...
