Im try use this form on create product:
this is into the product_form:
<%= f.fields_for :feature do |ft| %>
<%= ft.label :name %>
<%= ft.text_field :name %>
<%= ft.label :value %>
<%= ft.text_field :value %>
<% end %>
But when try create im get this error
Can't mass-assign protected attributes: feature
Im try put this in my Product model:
attr_accessible :code, :description, :price, :title,:image_1,:image_2,:image_3,:image_4,:image_5,:image_6,:image_7,:image_8,:features_attributes # and feature_attributes meet
accepts_nested_attributes_for :features
but get the same error, my association is
product.rb
has_many :features
feature.rb
belongs_to :product
i see the nested attributes class but dont found because what the error persists:
http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
the error is:
Can't mass-assign protected attributes: feature
if someone can helpe im thanks very very very much.