Commit 44a3c8774f608f9a0a2101d4811680647a5e4bcd

Authored by Marcos Pereira
1 parent 723a6061

Allow other Profile types to use blocks

Signed-off-by: Rodrigo Souto <rodrigo@colivre.coop.br>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/noosfero/plugin.rb
... ... @@ -190,7 +190,7 @@ class Noosfero::Plugin
190 190 type = type.map do |x|
191 191 x.is_a?(String) ? x.capitalize.constantize : x
192 192 end
193   - raise "This is not a valid type" if !type.empty? && ![Person, Community, Enterprise, Environment].detect{|m| type.include?(m)}
  193 + raise "This is not a valid type" if !type.empty? && (type.any?{|t| !(t < Profile) && t != Environment })
194 194  
195 195 position = options[:position]
196 196 position = position.is_a?(Array) ? position : [position].compact
... ...