Tiny grammar correction in documentation [ci skip]

This commit is contained in:
Ankit gupta 2015-05-05 10:51:11 -04:00
parent 918aa6e878
commit 72c5b517d4
1 changed files with 1 additions and 1 deletions

View File

@ -749,7 +749,7 @@ class ApplicationController < ActionController::Base
end
```
Note that the filter in this case uses `send` because the `logged_in?` method is private and the filter is not run in the scope of the controller. This is not the recommended way to implement this particular filter, but in more simple cases it might be useful.
Note that the filter in this case uses `send` because the `logged_in?` method is private and the filter does not run in the scope of the controller. This is not the recommended way to implement this particular filter, but in more simple cases it might be useful.
The second way is to use a class (actually, any object that responds to the right methods will do) to handle the filtering. This is useful in cases that are more complex and cannot be implemented in a readable and reusable way using the two other methods. As an example, you could rewrite the login filter again to use a class: