Please sign in to comment.
This is impossible in some cases, hard in others, and maybe be undesirably magical anyway. For instance, if someone wanted to do `link_to(@post)`, we could *maybe* determined the controller action and method and figure out if that's authorized or not. But if they do `link_to ('Search', 'http://www.google.com')`, there is truly no way for Authority to authorize that. So `authorized_link_to` would not be usable in that case, and it's unclear what it should do. Finally, if the developer does the normal `link_to(@post) if current_user.can_read?(@post)`, it's clear to him/her how Authority will answer that question. But with `authorized_link_to`, there would be a layer of magic in determining which permission to check, which would make this harder to understand and debug. So: not gonna do it.
- Loading branch information...