多くのコメントを含む投稿があるとしましょう。
やろうとすると
post.restrict!(current_user).comments.exists?
次のように失敗します。
SystemStackError: stack level too deep
from /Users/lord_HX/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/pry-.9.12.6/lib/pry/pry_instance.rb:328
post.rb をシンプルに変更しました
protect do |(current_user, current_account), project|
can :read
end
しかし、それでも失敗します...
exists?
/protector-0.7.6/lib/protector/adapters/active_record/relation.rb から無限にメソッドを実行しているようです
だから私はこの問題を回避する方法の提案を探しています...