I use form_for to access a serialized instance:
<%= fields_for :settings, @my_model.settings do |settings_form| %>
where “settings” is the serialized instance. This works fine, but I
get the below depreciation. The problem is that when using as
suggested
<%= fields_for @my_model.settings, :as => settings do |settings_form|
%>
I get some missing model_name error. Of course it has no model name,
as it is not an ActiveRecord model. But the depreciated form_for way
doesn’t have that problem.
Is there a better way now to use a serialized field together with
form_for?
DEPRECATION WARNING: Using form_for(:name, @resource) is deprecated.
Please use form_for(@resource, :as => :name) instead. (called from
_app_views_grids_edit_settings_html_erb___416806962__616774948_0 at /
home/zeus/projects/my_project/app/views/my_model/
edit_settings.html.erb:17)
Kai