Commit 2b2a906cabdcdc326ab8da98d980f47db0f243a8

Authored by Gabriela Navarro
1 parent a7f0469c

When the block was from an environment it breaks the show to followers option

  - add the checking to be sure that the owner of the block isn't
    Environment

Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/block.rb
@@ -224,7 +224,7 @@ class Block &lt; ActiveRecord::Base @@ -224,7 +224,7 @@ class Block &lt; ActiveRecord::Base
224 'all' => _('All users'), 224 'all' => _('All users'),
225 'logged' => _('Logged'), 225 'logged' => _('Logged'),
226 'not_logged' => _('Not logged'), 226 'not_logged' => _('Not logged'),
227 - 'followers' => owner.organization? ? _('Members') : _('Friends') 227 + 'followers' => owner.class != Environment && owner.organization? ? _('Members') : _('Friends')
228 } 228 }
229 end 229 end
230 230