From 99d889f6e27c9beaed06f1b8b228a330f1d8d688 Mon Sep 17 00:00:00 2001 From: Pietro Giorgianni Date: Thu, 12 Jan 2012 16:18:55 +0100 Subject: [PATCH] Fix a before_filter preventing to save a content instance with a custom field `active' or `visible' set to false. Fixes #272. --- app/models/content_instance.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/content_instance.rb b/app/models/content_instance.rb index bef5cbd5..2486522b 100644 --- a/app/models/content_instance.rb +++ b/app/models/content_instance.rb @@ -104,6 +104,7 @@ class ContentInstance def set_visibility field = self.content_type.content_custom_fields.detect { |f| %w{visible active}.include?(f._alias) } self._visible = self.send(field._name) rescue true + true end def add_to_list_bottom