Rudi W. wrote:>Therefore I''ve started investigating how I can accesss my helpers
in my
>model - I know this is not best practise, but its the only way I can see
>to make this work.
So your idea here is to fix a bad practice by using an even worse
practice?
> How do I reach my helpers in the model in a more efficient way?
> Or can I construct my code in a more correct way?
Dealing with languages is a view specific tasks. Models should not be
concerned with language specific issues, In my view the pain this is
giving you should be viewed like a "toothache." Your code is trying to
tell you something is fundamentally wrong. Using pain relievers, might
get you by for a time, but eventually the problem will need to be
addresses at the source.
However, if you have code that needs to be shared between the MVC layers
it''s common practice to put that code in modules inside the lib
directory, which is provided for just this sort of sharing. That
doesn''t
mean, however, that lib is intended to be a "free zone" where rules of
MVC don''t matter and you''re free to break it at will.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---