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 4  
5 5 def communities
6 6 type = []
7   - if params[:type] == "Software"
  7 + params[:type].downcase! unless params[:type].nil?
  8 +
  9 + if params[:type] == "software"
8 10 type = profile.softwares
9   - elsif params[:type] == "Institution"
  11 + elsif params[:type] == "institution"
10 12 type = profile.institutions
11 13 else
12 14 profile.communities.select do |community|
... ...