Bernard Filipowsky
Bernard Filipowsky

Reputation: 11

Creating a Ruby on Rails application initialization trivia

I am preparing a trivia for my teammates, to have some fun and refresh knowledge about Rails application initialization process :)

I need to plant a "pig" somewhere, along the way in a Rails application. Something that doesn't blow up the application, but makes it behaving little weird. I already got some ideas, but I want to hear yours.

So I got a question for programmers with some experience under their belt with Ruby on Rails: where would you put a line of code, that would be evaluated while the application starts up? One line that won't break it, but will add an unexpected feature or two?

Upvotes: 1

Views: 213

Answers (2)

BvuRVKyUVlViVIc7
BvuRVKyUVlViVIc7

Reputation: 11811

You could create a plugin and mount it in the vendor directory, which change some rails behaviour..

Upvotes: 0

tadman
tadman

Reputation: 211560

There's a few places, most obviously config/initializers/ and least obviously config/boot.rb which is where you're not supposed to put things.

Upvotes: 3

Related Questions