Commit e5476e19deed00a41b2e55fb1188d315f7d5e9e8

Authored by Fabio Teixeira
Committed by Álvaro Fernando Matos de Souza
1 parent 0f51cb8b

Fix person institution get method and add functional tests

Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
lib/ext/profile_controller.rb
@@ -4,9 +4,11 @@ class ProfileController @@ -4,9 +4,11 @@ class ProfileController
4 4
5 def communities 5 def communities
6 type = [] 6 type = []
7 - if params[:type] == "Software" 7 + params[:type].downcase! unless params[:type].nil?
  8 +
  9 + if params[:type] == "software"
8 type = profile.softwares 10 type = profile.softwares
9 - elsif params[:type] == "Institution" 11 + elsif params[:type] == "institution"
10 type = profile.institutions 12 type = profile.institutions
11 else 13 else
12 profile.communities.select do |community| 14 profile.communities.select do |community|