Skip to content

Commit

Permalink
Fix a before_filter preventing to save a content instance with a
Browse files Browse the repository at this point in the history
custom field `active' or `visible' set to false.
Fixes locomotivecms#272.
  • Loading branch information
giorgian committed Jan 12, 2012
1 parent a650acd commit 99d889f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/content_instance.rb
Expand Up @@ -104,6 +104,7 @@ def slug_already_taken?
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
Expand Down

0 comments on commit 99d889f

Please sign in to comment.