Two classes in one program


#1

Hi,
Is it possible to write two class in one controller?
e.g:-

class ApplicationController < ActionController::Base
def abc
end
end
class Hash
def xyz
end
end

How it will work?

Thanks,
Tushar.


#2

On 15 Jan 2009, at 13:27, Tushar G. wrote:

def xyz
end
end

A file can define as many classes as you want. Rails’ automatic
loading of files for you will only be able to locate a class if it is
in the file with the appropriate name.

Fred