Navigation Menu

Skip to content

Commit

Permalink
compact collection members
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansing committed Jun 30, 2016
1 parent 6d57e3c commit d04dc3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/collection/base.rb
Expand Up @@ -75,11 +75,11 @@ def self.new_link_partial_name
end

def subcollections
members.map(&:target).select { |m| m.is_a?(::Collection::Base) }
members.map(&:target).compact.select { |m| m.is_a?(::Collection::Base) }
end

def concepts
members.map(&:target).reject { |m| m.is_a?(::Collection::Base) }
members.map(&:target).compact.reject { |m| m.is_a?(::Collection::Base) }
end

def additional_info
Expand Down

0 comments on commit d04dc3a

Please sign in to comment.