myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [1866] branches/event_logging/app/helpers/applica


From: noreply
Subject: [myexperiment-hackers] [1866] branches/event_logging/app/helpers/application_helper.rb: Work on news generation.
Date: Thu, 16 Oct 2008 10:59:00 -0400 (EDT)

Revision
1866
Author
alekses6
Date
2008-10-16 10:59:00 -0400 (Thu, 16 Oct 2008)

Log Message

Work on news generation. Fixed the issue in the previous commit - permissions now shown in the news properly.

Modified Paths

Diff

Modified: branches/event_logging/app/helpers/application_helper.rb (1865 => 1866)


--- branches/event_logging/app/helpers/application_helper.rb	2008-10-16 10:18:07 UTC (rev 1865)
+++ branches/event_logging/app/helpers/application_helper.rb	2008-10-16 14:59:00 UTC (rev 1866)
@@ -1549,18 +1549,12 @@
                 # TODO: check that if not found by sql, RecordNotFound exception is raised
                 shared_what_links_arr = []
                 items_shared_with_this_permission = Contribution.find_by_sql("SELECT contributable_type, contributable_id FROM Contributions WHERE policy_id = #{permission.policy_id}")
-                puts "============ HEHEHE ============"
-                items_shared_with_this_permission.each do |i|
-                  puts i
-                  puts i[0][0]
-                  puts i[0][1]
-                end
                 items_shared_with_this_permission.each do |item|
-                  object, path = evaluate_object_instance_and_path(item[0], item[1])
+                  object, path = evaluate_object_instance_and_path(item.contributable_type, item.contributable_id)
                   shared_what_links_arr << link_to(object.title, path)
                 end
                 
-                rtn << [timestamp, "#{name(log_entry.culprit_id)} shared #{access_rights} #{shared_what_links_arr.join(", ")} with #{link_to shared_with_name_or_title, shared_with_path}"]
+                rtn << [timestamp, "#{name(log_entry.culprit_id)} shared #{access_rights} #{shared_what_links_arr.join(", ")} with #{link_to shared_with_name_or_title, shared_with_path} #{model_visible_name(shared_with.class.to_s)}."]
               end
             rescue ActiveRecord::RecordNotFound
               # do nothing, but don't display the news entry for missing permission / network or user to which it refers to

reply via email to

[Prev in Thread] Current Thread [Next in Thread]