Commit 94ed730475412b9536826e5b6e6457bb40f9e738

Authored by Gabriela Navarro
Committed by Fabio Teixeira
1 parent c6dbf2ca

Adding institution_transaction to gov_user_plugin

Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing 1 changed file with 6 additions and 0 deletions   Show diff stats
lib/gov_user_plugin.rb
... ... @@ -217,6 +217,12 @@ class GovUserPlugin &lt; Noosfero::Plugin
217 217 send(name + '_transaction') if context.params.key?(model.to_sym)
218 218 end
219 219  
  220 + def call_institution_transaction(model)
  221 + context.profile.institution.send(model + '_id = ',
  222 + context.params[model.to_sym])
  223 + context.profile.institution.save!
  224 + end
  225 +
220 226 # Add and remove the user from it's institutions communities
221 227 def user_editor_institution_actions
222 228 user = context.profile.user
... ...