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.
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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs