I'm using selectize gem for this task and can't understand how to add values without {} to those would be saved correctly. I have array: true on this column, so values must be sent in an array, not the string.
I tried convert this attribute before saving of record, but still no result.
class Post < ActiveRecord::Base
before_validation :convert_to_array
def convert_to_array
self.tags = tags.split(",")
end
end
Error
ERROR: malformed array literal: "{{}}"
If there aren't callbacks
Parameters: {"post"=>{"title"=>"Aliquam laborum consequatur voluptatem quo.",
"tags"=>"asdas,zxzx"}, "_wysihtml5_mode"=>"1", "commit"=>"Save", "id"=>"4"}
Post,, for the columntags.t.string :tags, array: truetagsheretags.splittagsattribute and set the tag after splitting.?