application record: add array_attribute method.

Add `array_attribute` method that defines helper methods for converting
array attributes to or from strings.
This commit is contained in:
evazion
2018-11-13 16:25:45 -06:00
parent a57d4a9558
commit b660aeefd7
5 changed files with 37 additions and 16 deletions

View File

@@ -94,7 +94,7 @@ class PoolsController < ApplicationController
private
def pool_params
permitted_params = %i[name description category is_active post_ids]
permitted_params = %i[name description category is_active post_ids post_ids_string]
params.require(:pool).permit(*permitted_params, post_ids: [])
end
end