- @client_applications = @user.client_applications
- @tokens = @user.oauth_tokens.find :all, :conditions => 'oauth_tokens.invalidated_at is null and oauth_tokens.authorized_at is not null'
+ @client_applications = current_user.client_applications
+ @tokens = current_user.oauth_tokens.authorized
+ end
+
+ def show
+ @client_application = current_user.client_applications.find(params[:id])
+ rescue ActiveRecord::RecordNotFound
+ @type = "client application"
+ render :action => "not_found", :status => :not_found