summaryrefslogtreecommitdiffstats
path: root/app/models/board.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/board.rb')
-rw-r--r--app/models/board.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/board.rb b/app/models/board.rb
index 42b5499e1..f5efa7087 100644
--- a/app/models/board.rb
+++ b/app/models/board.rb
@@ -30,8 +30,9 @@ class Board < ActiveRecord::Base
validates_length_of :description, :maximum => 255
validate :validate_board
- scope :visible, lambda {|*args| { :include => :project,
- :conditions => Project.allowed_to_condition(args.shift || User.current, :view_messages, *args) } }
+ scope :visible, lambda {|*args|
+ includes(:project).where(Project.allowed_to_condition(args.shift || User.current, :view_messages, *args))
+ }
safe_attributes 'name', 'description', 'parent_id', 'move_to'