I made a simple helper with one function and put it in the relevant controller_helper and I noticed that the function is valid from the whole application views.
Why is that? shouldn’t the helper be valid only to his controller?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The process is the following:
If you’re in a view belonging to controller
fooand you call a helper calledmy_helper:if defined in
foo‘s helper, it’s executed from hereif not defined in
foo‘s helper but defined in another helper, saybar, it’s executed from thereif not in
foonor in anybar, it’s checked inapplication_helper. If it doesn’t exist here, an error is raised.