Using helpers in model: how do I include helper dependencies?

后端 未结 6 914
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 13:37

I\'m writing a model that handles user input from a text area. Following the advice from http://blog.caboo.se/articles/2008/8/25/sanitize-your-users-html-input, I\'m cleani

6条回答
  •  伪装坚强ぢ
    2020-11-27 14:13

    To access helpers from your own controllers, just use:

    OrdersController.helpers.order_number(@order)
    

提交回复
热议问题