From c0006e1040dab6f72428a5b1ce90d07484486b44 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Sat, 1 Aug 2009 10:04:20 -0700 Subject: [PATCH] [#2558] Check that @memberships is set before using it. --- app/views/users/_memberships.rhtml | 2 +- lib/rate_users_helper_patch.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/_memberships.rhtml b/app/views/users/_memberships.rhtml index 5b0c774..bc51cd4 100644 --- a/app/views/users/_memberships.rhtml +++ b/app/views/users/_memberships.rhtml @@ -1,5 +1,5 @@ <%# TODO: Override the default view until post 0.8.x which will have the hooks %> -<% if @memberships.any? %> +<% if @memberships && @memberships.any? %> diff --git a/lib/rate_users_helper_patch.rb b/lib/rate_users_helper_patch.rb index 139d2b3..b6da8c8 100644 --- a/lib/rate_users_helper_patch.rb +++ b/lib/rate_users_helper_patch.rb @@ -1,4 +1,4 @@ -require_dependency 'users_helper' +require 'users_helper' module RateUsersHelperPatch def self.included(base) # :nodoc:
<%= l(:label_project) %>