Ruby on Rails
Tuesday, October 20, 2015
On Friday, 16 October 2015 12:30:45 UTC-4, Mike Witt wrote:
On 10/16/2015 09:21:44 AM, Hassan Schroeder wrote:
> On Fri, Oct 16, 2015 at 8:46 AM, Mike Witt <msg...@gmail.com> wrote:
> > In Rails 4.2, is there a place where I can put code that I want to
> be called
> > immediately after the rails server starts up
>
> Initializers are called *during* startup; would that do?
I'm not sure. Would I have access to the database, either through
ActiveRecords or ?
Pardon my ignorance here. I'm not sure where to find documentation
concerning the "transition" between getting all the framework
initialized and the "normal" rails stuff where you're just responding
to http requests one-by-one.
As you've noted, config/initializers is the right place for this. For reference or general curiosity, there's a detailed guide to the Rails initialization process here:
http://guides.rubyonrails.org/initialization.html
--Matt Jones
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/98514966-9794-4b03-a526-554fff17da52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment