Modified: trunk/app/views/oauth/index.rhtml (2671 => 2672)
--- trunk/app/views/oauth/index.rhtml 2011-08-12 17:09:31 UTC (rev 2671)
+++ trunk/app/views/oauth/index.rhtml 2011-08-15 09:37:34 UTC (rev 2672)
@@ -4,7 +4,6 @@
<table>
<tr><th>Application</th><th>Issued</th><th> </th></tr>
<address@hidden do |token|%>
-<% if token.client_application -%>
<tr>
<td><%=link_to token.client_application.name,token.client_application.url%></td>
<td><%=token.authorized_at%></td>
@@ -15,7 +14,6 @@
<%end%>
</td>
</tr>
-<%end%>
<%end%>
</table>
Added: trunk/db/migrate/091_fix_orphaned_oauth_tokens.rb (0 => 2672)
--- trunk/db/migrate/091_fix_orphaned_oauth_tokens.rb (rev 0)
+++ trunk/db/migrate/091_fix_orphaned_oauth_tokens.rb 2011-08-15 09:37:34 UTC (rev 2672)
@@ -0,0 +1,18 @@
+# myExperiment: db/migrate/091_fix_orphaned_oauth_tokens.rb
+#
+# Copyright (c) 2010 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class FixOrphanedOauthTokens < ActiveRecord::Migration
+ def self.up
+
+ OauthToken.find(:all).each do |t|
+ if t.client_application.nil?
+ t.destroy()
+ end
+ end
+ end
+
+ def self.down
+ end
+end