require ''observer'' require ''set'' class Content < ActiveRecord::Base include Observable #somecode here that I hidden class ContentTextHelpers include ActionView::Helpers::TagHelper include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::TextHelper end +++++++++++++++++++++++ there''s a Content class nested ContentTextHelers class. I''m a litte confused about that. what''s nested class work for? is only Ruby have nested class? like C++, is inherit class. -- 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 -~----------~----~----~----~------~----~------~--~---
Zhenning Guan wrote:> require ''observer'' > require ''set'' > > class Content < ActiveRecord::Base > include Observable > > #somecode here that I hidden > > class ContentTextHelpers > include ActionView::Helpers::TagHelper > include ActionView::Helpers::SanitizeHelper > include ActionView::Helpers::TextHelper > end > > +++++++++++++++++++++++ > > there''s a Content class nested ContentTextHelers class. I''m a litte > confused about that. > what''s nested class work for? > is only Ruby have nested class? like C++, is inherit class.ContentTextHelpers is the single class for Content class scope . generally we can all classes are nested class of Object -- 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 -~----------~----~----~----~------~----~------~--~---