Diff
Modified: branches/events/app/controllers/announcements_controller.rb (3101 => 3102)
--- branches/events/app/controllers/announcements_controller.rb 2012-08-23 13:34:24 UTC (rev 3101)
+++ branches/events/app/controllers/announcements_controller.rb 2012-08-23 13:36:02 UTC (rev 3102)
@@ -50,6 +50,7 @@
params[:announcement][:user_id] = current_user.id
@announcement = Announcement.new(params[:announcement])
if @announcement.save
+ Event.create(:subject => current_user, :action ="" 'create', :objekt => @announcement)
flash[:notice] = 'Announcement was successfully created.'
redirect_to :action ="" 'index'
else
@@ -64,6 +65,7 @@
def update
@announcement = Announcement.find(params[:id])
if @announcement.update_attributes(params[:announcement])
+ Event.create(:subject => current_user, :action ="" 'edit', :objekt => @announcement)
flash[:notice] = 'Announcement was successfully updated.'
redirect_to :action ="" 'show', :id => @announcement
else
Modified: branches/events/app/controllers/application_controller.rb (3101 => 3102)
--- branches/events/app/controllers/application_controller.rb 2012-08-23 13:34:24 UTC (rev 3101)
+++ branches/events/app/controllers/application_controller.rb 2012-08-23 13:36:02 UTC (rev 3102)
@@ -344,7 +344,7 @@
end
- def update_attributions(attributable, params)
+ def update_attributions(attributable, params, user)
# First delete old attributions:
attributable.attributors.each do |a|
Modified: branches/events/app/controllers/blobs_controller.rb (3101 => 3102)
--- branches/events/app/controllers/blobs_controller.rb 2012-08-23 13:34:24 UTC (rev 3101)
+++ branches/events/app/controllers/blobs_controller.rb 2012-08-23 13:36:02 UTC (rev 3102)
@@ -164,7 +164,7 @@
update_layout(@blob, params[:layout])
update_credits(@blob, params)
- update_attributions(@blob, params)
+ update_attributions(@blob, params, current_user)
if policy_err_msg.blank?
@@ -222,7 +222,7 @@
policy_err_msg = update_policy(@blob, params)
update_credits(@blob, params)
- update_attributions(@blob, params)
+ update_attributions(@blob, params, current_user)
update_layout(@blob, params[:layout])
if policy_err_msg.blank?
Modified: branches/events/app/controllers/users_controller.rb (3101 => 3102)
--- branches/events/app/controllers/users_controller.rb 2012-08-23 13:34:24 UTC (rev 3101)
+++ branches/events/app/controllers/users_controller.rb 2012-08-23 13:36:02 UTC (rev 3102)
@@ -318,6 +318,7 @@
user.errors.full_messages.each { |e| logger.error(e) }
#END DEBUG
if confirmed
+ Event.create(:subject => user, :action ="" 'register')
self.current_user = user
self.current_user.process_pending_invitations! # look up any pending invites for this user + transfer them to relevant tables from 'pending_invitations' table
confirmed = false if !logged_in?