Modified: branches/showcase48/app/models/membership.rb (3004 => 3005)
--- branches/showcase48/app/models/membership.rb 2012-05-21 12:54:34 UTC (rev 3004)
+++ branches/showcase48/app/models/membership.rb 2012-05-21 12:58:41 UTC (rev 3005)
@@ -12,7 +12,7 @@
validates_presence_of :user_id, :network_id
- validate :membership_allowed
+ validate_on_create :membership_allowed
# validates_each :user_id do |model, attr, value|
# model.errors.add attr, "already member" if model.network.member? value
Modified: branches/showcase48/lib/acts_as_contributable.rb (3004 => 3005)
--- branches/showcase48/lib/acts_as_contributable.rb 2012-05-21 12:54:34 UTC (rev 3004)
+++ branches/showcase48/lib/acts_as_contributable.rb 2012-05-21 12:58:41 UTC (rev 3005)
@@ -39,6 +39,8 @@
:contributable => c)
end
+ c.contribution.contributor ||= c.contributor
+
if c.contribution.policy.nil?
c.contribution.policy = create_default_policy(c.contributor)
end