myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3084] trunk/app/views/users/show.rhtml: fixed to


From: noreply
Subject: [myexperiment-hackers] [3084] trunk/app/views/users/show.rhtml: fixed totals in user show page to reflect authorisation
Date: Fri, 10 Aug 2012 11:51:58 +0000 (UTC)

Revision
3084
Author
dgc
Date
2012-08-10 11:51:58 +0000 (Fri, 10 Aug 2012)

Log Message

fixed totals in user show page to reflect authorisation

Modified Paths

Diff

Modified: trunk/app/views/users/show.rhtml (3083 => 3084)


--- trunk/app/views/users/show.rhtml	2012-08-10 10:44:24 UTC (rev 3083)
+++ trunk/app/views/users/show.rhtml	2012-08-10 11:51:58 UTC (rev 3084)
@@ -229,10 +229,10 @@
 						</b> 
 			    </p>
 					
-					<% filter_contributables(@user.contributions).each do |klass,contributables| %>
+					<% filter_contributables(@user.contributions).each do |klass, contributables| %>
 						<p>
 				      <b>
-				      	<%= link_to(pluralize(contributables.length, controller_visible_name(klass.humanize.pluralize)), url_for(:action ="" controller_visible_name(klass.humanize.pluralize).downcase)) %>
+				      	<%= link_to(pluralize(Authorization.scoped(klass.constantize, :authorised_user => current_user).find(:all, :select => "0", :conditions => { :contributor_type => 'User', :contributor_id => @user.id } ).length, controller_visible_name(klass.humanize.pluralize)), url_for(:action ="" controller_visible_name(klass.humanize.pluralize).downcase)) %>
 							</b>
 				    </p>
 					<% end %>

reply via email to

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