From 2322586131fa0ee4748030e669423a182108f97a Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 14 Oct 2014 17:21:34 -0400 Subject: [PATCH] FIX: Saving a field as not required was actually making it required until you edited it. --- app/controllers/admin/user_fields_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/admin/user_fields_controller.rb b/app/controllers/admin/user_fields_controller.rb index 856f48b389e..56ab3889deb 100644 --- a/app/controllers/admin/user_fields_controller.rb +++ b/app/controllers/admin/user_fields_controller.rb @@ -6,6 +6,7 @@ class Admin::UserFieldsController < Admin::AdminController def create field = UserField.new(params.require(:user_field).permit(*Admin::UserFieldsController.columns)) + field.required = params[:required] == "true" json_result(field, serializer: UserFieldSerializer) do field.save end