[Rails] Re: Helper in Initializer: Is it possible ?

2010-07-07 Thread Tom Ha
Thanks! -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: Helper in Initializer: Is it possible ?

2010-07-06 Thread Marnen Laibow-Koser
Tom Ha wrote: Hi there, is there a way in Rails to use helpers in an Initializer ? You should never need to. Helpers are only for generating view code, and you shouldn't be doing that in initializers. If yes, how ? If no, where else to put the code needed in the Initializer (as well

[Rails] Re: Helper in Initializer: Is it possible ?

2010-07-06 Thread Tom Ha
What are you trying to achieve? Basically, I put some Rufus scheduler code in the Initializer folder so the scheduler runs fine, even when the hoster needs to reboot the machine for whatever reason and without my knowledge. The Rufus scheduler includes some .pdf-generating code (amongst other

[Rails] Re: Helper in Initializer: Is it possible ?

2010-07-06 Thread Bob Proulx
Tom Ha wrote: The .pdf must display numbers in a special format. And until now, I used helper code to get the numbers into this format, so it would have been convenient to use the same helper within this Rufus scheduler initializer.. To my casual eye this seems like something that should go