I have a model with some virtual attributes, and they are included in my form and passed to the controller, but I can not force the virtual attributes (SKU) to wrap inside the model hash
{"name"=>"Productname", "description"=>"Description", "sku"=>"ak0001", "product"=>{"name"=>"Productname", "description"=>"Description"}}
I can use the wrap_parameters parameters to overwrite it, but I would have to add all the attributes (virtual and non-virtual attributes) to the array, can I just add virtual attributes to the existing wrap parameter?
wrap_parameters Product, :include => [:sku, :name, ..etc...]
ruby-on-rails
user1883793
source share