i got situation where i have to work on legacy code. One thing, i have to do to have quick result is to define a function in views. Is it good ? how to avoid them ?
Share
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.
If it’s view logic: just create the function in the view. If used from multiple views: consider putting the function in a library.
If it’s business logic: create the function in the appropriate place like a model.