Michael Johnston
2007-Apr-25 22:49 UTC
Canonical way to do a create form for ActiveResource?
What would be the proper way to do setup a create action for an ActiveResource? I can''t just use @object = MyResource.new in the new action, because the bare resource doesn''t have any attributes, so in the form @object.name etc. will fail. I can use an OpenStruct, but then other things fail, like error_messages_for I would like if possible for the view to not have to care at all whether it is being used to edit an ActiveResource or an ActiveRecord. Thanks, Michael Johnston --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---