On 15 Jan 2009, at 13:27, Tushar Gandhi wrote:
>
> 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
>
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> How it will work?
>
> Thanks,
> Tushar.
> --
> Posted via http://www.ruby-forum.com/.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---