nathanl / authority

*CURRENTLY UNMAINTAINED*. Authority helps you authorize actions in your Rails app. It's ORM-neutral and has very little fancy syntax; just group your models under one or more Authorizer classes and write plain Ruby methods on them.
MIT License
1.21k stars 67 forks source link

Use instance_exec instead of Proc.bind #56

Closed div closed 11 years ago

div commented 11 years ago

Since that's what the ActiveSupport currently does https://github.com/rails/rails/blob/4-0-stable/activesupport/lib/active_support/rescuable.rb

nathanl commented 11 years ago

This is a nice patch. Thanks! Would you mind answering my question above before I merge it?

div commented 11 years ago

Sure, the first test has really narrow scope, a typo in the error class name and the test is always passing. When we are asserting presence i'm in for a narrow thing, but when we are asserting absence of smth, i prefer that smth to be large enough.

nathanl commented 11 years ago

Merged. Thanks for this patch!