Merge pull request #273 from giorgian/fix_content_not_visible

Fix a before_filter preventing to save a content instance with a
This commit is contained in:
Mario Visic 2012-01-14 03:36:10 -08:00
commit 81b89ba389

View File

@ -104,6 +104,7 @@ class ContentInstance
def set_visibility def set_visibility
field = self.content_type.content_custom_fields.detect { |f| %w{visible active}.include?(f._alias) } field = self.content_type.content_custom_fields.detect { |f| %w{visible active}.include?(f._alias) }
self._visible = self.send(field._name) rescue true self._visible = self.send(field._name) rescue true
true
end end
def add_to_list_bottom def add_to_list_bottom