相同的 Method 在不同 Controller 出現第二次出現請注意
場景
#TODO
搬到 application controller
1
2
3
4
5
6
7
8
9
10
11
12
13
| class ApplicationController ActionController::Base
def find_user
@user = current_user
end
end
class UserFavoritesController ApplicationController
before_filter :find_user
end
class UserProfileController ApplicationController
before_filter :find_user
end
|