Skip to content

Commit a78cfdb

Browse files
committed
bugfix: the safe_attributes lambda argument needs to go under an :if hash key
1 parent bd4ae21 commit a78cfdb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/redmine_gtt/patches/issue_patch.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module IssuePatch
66
def self.apply
77
Issue.prepend self unless Issue < self
88
Issue.class_eval do
9-
safe_attributes "geom" if lambda {|issue, user| user.allowed_to?(:edit_issues, issue.project)}
9+
safe_attributes "geom",
10+
if: ->(issue, user){ user.allowed_to?(:edit_issues, issue.project)}
1011
end
1112
end
1213

0 commit comments

Comments
 (0)