From eac0df4107a3653d2ccd03136fecefa51e97898f Mon Sep 17 00:00:00 2001 From: Arthur Del Esposte Date: Mon, 10 Nov 2014 11:28:00 -0200 Subject: [PATCH] Create institution with default institution template --- controllers/mpog_software_plugin_controller.rb | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/controllers/mpog_software_plugin_controller.rb b/controllers/mpog_software_plugin_controller.rb index f4fd137..1afe472 100644 --- a/controllers/mpog_software_plugin_controller.rb +++ b/controllers/mpog_software_plugin_controller.rb @@ -67,6 +67,11 @@ class MpogSoftwarePluginController < ApplicationController if !params[:community].nil? and !params[:institutions].nil? response_message = {} + institution_template = Community["institution"] + if (!institution_template.blank? && institution_template.is_template) + params[:community][:template_id] = institution_template.id unless params[:community].blank? + end + institution = private_create_institution() response_message = if institution.errors.full_messages.empty? and institution.valid? and institution.save -- libgit2 0.21.2