helper_method exposes Controller’s method to a view.
Is that possible to expose Controller’s method to a model ?
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 MVC model is trying to separate code. So if you wanna access code in controllers from model. This means design wise, you may be wrong somewhere. If you wanna share code between controllers and models, it is suggested to put it in to library.