storing a static array

Well, if it's not going to change, you make it a constant.
Constants in ruby are in uppercase.
MY_ARRAY = ['why should', 'I have to copy this', 'every time i want
to use > it']
Normally this should be enough, but if you want to go extra safe you
can freeze it, since an array is an object (

where to put it in Rails: one option is to declare it in a file in the
lib directory. Rails loads what is in lib.
To make sure it will never conflict with any other, you could put it
into a module, and call it as


Richard Schneeman wrote:

You can also look at using an external configuration file instead of
Check out the comments for further ideas.


you're right, that is cleaner.

unless you really want an array, for some reason