Commit 956a5240c0e03d21a0bae4902717be8ec710105b
1 parent
bb945d65
Exists in
master
and in
27 other branches
stoa-plugin: fixes stoa's plugin initialization error
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
plugins/stoa/lib/stoa_plugin.rb
| ... | ... | @@ -60,14 +60,13 @@ class StoaPlugin < Noosfero::Plugin |
| 60 | 60 | end |
| 61 | 61 | |
| 62 | 62 | def account_controller_filters |
| 63 | - environment = context.environment | |
| 64 | - block = lambda do | |
| 63 | + block = lambda do |context| | |
| 65 | 64 | params[:profile_data] ||= {} |
| 66 | 65 | params[:profile_data][:invitation_code] = params[:invitation_code] |
| 67 | 66 | invitation = Task.pending.find(:first, :conditions => {:code => params[:invitation_code]}) |
| 68 | 67 | if request.post? |
| 69 | 68 | if !invitation && !StoaPlugin::UspUser.matches?(params[:profile_data][:usp_id], params[:confirmation_field], params[params[:confirmation_field]]) |
| 70 | - @person = Person.new(:environment => environment) | |
| 69 | + @person = Person.new(:environment => context.environment) | |
| 71 | 70 | @person.errors.add(:usp_id, _(' validation failed')) |
| 72 | 71 | render :action => :signup |
| 73 | 72 | end | ... | ... |