From 4e607bc4cf1d0b5df5fe5c456c7a4117289b45eb Mon Sep 17 00:00:00 2001 From: f Date: Thu, 17 May 2018 15:42:35 -0300 Subject: [PATCH] permitir select unicos --- app/models/post.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/post.rb b/app/models/post.rb index ff8f134..5c7149d 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -248,6 +248,8 @@ class Post type = 'text' when tt == 'text' type = 'text_area' + when tt.is_a?(String) && tt.split('/', 2).count == 2 + type = 'select' when tt.is_a?(Array) type = 'select' when tt.is_a?(FalseClass) || tt.is_a?(TrueClass)