Commit c74fdadd8edadb15a972071f0ae4229e5b12e544

Authored by David Silva
Committed by Luciano Prestes
1 parent 4d6c78ba

register_institution_modification:Create initial institution modification log

Sygned-off-by: David Carlos <ddavidcarlos1392@gmail.com>
Sygned-off-by: Luciano Prestes  <lucianopcbr@gmail.com>
controllers/mpog_software_plugin_controller.rb
@@ -72,7 +72,7 @@ class MpogSoftwarePluginController &lt; ApplicationController @@ -72,7 +72,7 @@ class MpogSoftwarePluginController &lt; ApplicationController
72 if request.xhr? and !params[:community].nil? and !params[:institution].nil? and !params[:recaptcha_response_field].nil? 72 if request.xhr? and !params[:community].nil? and !params[:institution].nil? and !params[:recaptcha_response_field].nil?
73 response_message = {} 73 response_message = {}
74 74
75 - institution = create_institution 75 + institution = private_create_institution
76 76
77 response_message = if verify_recaptcha(:model=> institution, :message => _('Please type the word correctly')) 77 response_message = if verify_recaptcha(:model=> institution, :message => _('Please type the word correctly'))
78 if institution.errors.full_messages.empty? and institution.valid? and institution.save 78 if institution.errors.full_messages.empty? and institution.valid? and institution.save
@@ -145,7 +145,7 @@ class MpogSoftwarePluginController &lt; ApplicationController @@ -145,7 +145,7 @@ class MpogSoftwarePluginController &lt; ApplicationController
145 145
146 protected 146 protected
147 147
148 - def create_institution 148 + def private_create_institution
149 community = Community.new(params[:community]) 149 community = Community.new(params[:community])
150 community.environment = environment 150 community.environment = environment
151 151
db/migrate/20140815194530_register_institution_modification.rb 0 → 100644
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
  1 +class RegisterInstitutionModification < ActiveRecord::Migration
  2 + def up
  3 + end
  4 +
  5 + def down
  6 + end
  7 +end