OSDN Git Service

Removed calls to deprecated Project.visible_by method.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 5 Apr 2011 12:57:18 +0000 (12:57 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 5 Apr 2011 12:57:18 +0000 (12:57 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5328 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/users_controller.rb
test/functional/projects_controller_test.rb

index 634ab0a..dc991c5 100644 (file)
@@ -69,7 +69,7 @@ class UsersController < ApplicationController
   
   def show
     # show projects based on current user visibility
-    @memberships = @user.memberships.all(:conditions => Project.visible_by(User.current))
+    @memberships = @user.memberships.all(:conditions => Project.visible_condition(User.current))
     
     events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
     @events_by_day = events.group_by(&:event_date)
index 74912a7..12eb372 100644 (file)
@@ -57,7 +57,7 @@ class ProjectsControllerTest < ActionController::TestCase
     assert_response :success
     assert_template 'common/feed.atom.rxml'
     assert_select 'feed>title', :text => 'Redmine: Latest projects'
-    assert_select 'feed>entry', :count => Project.count(:conditions => Project.visible_by(User.current))
+    assert_select 'feed>entry', :count => Project.count(:conditions => Project.visible_condition(User.current))
   end
   
   context "#index" do