Topic: please help me break MVC with rails 2.3.x
I need to render reports using DataTables, so the report data comes from Model#as_json
Some of the report data are links. For example, username has to be displayed as a link to that user page. So I need to put in my model's as_json method: link_to(\"Show\", user_path(self))
If I am not mistaken this can only be accomplished by breaking MVC, so how can I get this to work in my model?
I believe I have got the link_to working with include ActionView::Helpers::UrlHelper but I can't for the life of me figure out what to include so the _path helper works!
..and sure if there is a way to accomplish this without breaking MVC I'd really appreciate help in that regard also.
Thanks in advance, hoping someone has an answer cause google certainly doesn't!
p.s. moderator/admin: i had to escape the quotes in my post