Never mind, found helper_method. So now I have
helper_method :current_practice in my ApplicationController, and it
magically appears in the ApplicationHelper as well.
Walter
On May 11, 2011, at 2:34 PM, Walter Lee Davis wrote:
I have a method:
def current_practice
if session[:imperson
I have a method:
def current_practice
if session[:impersonating]
Practice.find session[:impersonating]
else
current_user.practice
end
end
It is identical in both controller and helper. How could I DRY this up
so I only need maintain it in one place?
I already have
2 matches
Mail list logo