Am I crazy?

if foo in bar is not valid syntax.

defining an instance method in Application Controller should make it available in the child controllers.

However, as this information is constant and probably related to your data model rather than your presentation, I would suggest using a constant in the appropriate model.

For instance, if you have an Image model, you would do:

class Image

...

FILE_TYPES = %w( jpeg tiff gif eps ).freeze

and then use it as:

Image::FILE_TYPES.include? f.type

Brian: Stay cool, you are okay.

Others: Jesus, why in the hell most guys out there are not listening careful to a simple, reasonable and important question?? This is not about IRB, or how to do it in a different way. And suggestions like "read a good book" are not helpful at all, btw. This is about name scopes, and what we need is a precise definition here.

David: What you say matches the documentation and it makes sense. Furthermore, you WROTE a good book.

In the Rails application I am currently working on I have created a method in the application controller. I cannot call it in any other controller, neither as a private nor as a public method.

After having created a completely new Rails application I did the same thing. Now I could call it successfully. Private or public, it does not make any different.

With other words: Rails is behaving inconsistent. Bad news. And it might very well explain why it worked the other day in Brians application but stopped doing so 3 days later.