Commit 25eb854170081927fa4334b025e38be6c7455120
1 parent
956a5240
Exists in
master
and in
29 other branches
stoa-plugin: allow mass assignment for usp_id and invitation_code
Both attributes can be set by the user on signup so we should allow mass assignment.
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
plugins/stoa/lib/ext/person.rb
1 | 1 | require_dependency 'person' |
2 | 2 | |
3 | 3 | class Person |
4 | + attr_accessible :usp_id, :invitation_code | |
5 | + | |
4 | 6 | validates_uniqueness_of :usp_id, :allow_nil => true |
5 | 7 | settings_items :invitation_code |
6 | 8 | validate :usp_id_or_invitation, :if => lambda { |person| person.environment && person.environment.plugin_enabled?(StoaPlugin)} | ... | ... |