Q:
Given this controller code, which choice describes the expected behavior if parameters are submitted to the update action that includes values for the product's name, style, color, and price?
class ProductController < ActionController::Base
def update
@product = Product.find(params[:id])
if @product.update_attributes(product_params)
redirect_to(product_path(@product))
else
render('edit')
end
end
private
def product_params
params.require(:product).permit(:name, :style, :color)
end
end
a. The product will not be updated and the edit template will be rendered.
b. The product will not be updated and the controller will raise an ActiveModel::ForbiddenAttributes exception.
c. The product will be updated with the values for name, style, and color, but the value for price will be ignored.
d. The product will be updated with the values for name, style, color, and price.