the following code
fieldvalue = Admin::FieldValue.where(:item_id => @admin_item.id, :field_id => key)
fieldvalue.update_attributes(:value => value)
raise the following error
NoMethodError (undefined method `update_attributes' for #<ActiveRecord::Relation:0x00000102dfc868>):
why is it a Relation object and not a FieldValue object, what’s the right way to manage this
fieldvalueshould return only one value?Or if you expect multiple items: