Commit cae1f9c64c28f511fefa79c5fbb26b51b8fb743b
Exists in
web_steps_improvements
and in
8 other branches
Merge branch 'master' into 'master'
Allow other Profile types to use blocks Allow other Profile types (besides Person, Community and Enterprise) to use blocks See merge request !742
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 | ... | ... |