From e5476e19deed00a41b2e55fb1188d315f7d5e9e8 Mon Sep 17 00:00:00 2001 From: Fabio Teixeira Date: Thu, 7 May 2015 10:47:47 -0300 Subject: [PATCH] Fix person institution get method and add functional tests --- lib/ext/profile_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ext/profile_controller.rb b/lib/ext/profile_controller.rb index cd72996..bd21b16 100644 --- a/lib/ext/profile_controller.rb +++ b/lib/ext/profile_controller.rb @@ -4,9 +4,11 @@ class ProfileController def communities type = [] - if params[:type] == "Software" + params[:type].downcase! unless params[:type].nil? + + if params[:type] == "software" type = profile.softwares - elsif params[:type] == "Institution" + elsif params[:type] == "institution" type = profile.institutions else profile.communities.select do |community| -- libgit2 0.21.2