Hey everyone, I have a controller called CMSController and then a helper called cms_helper.rb. When trying to access my application I get the following: C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:249:in `load_missing_constant'' Expected C:/DEVELOPMENT/satechevents/app/helpers/cms_helper.rb to define CmsHelper But the file cms_helper.rb is just an empty helper created when I created the controller using script/generate Any ideas? Regards, Schalk --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, Your empty cms_helper.rb helper should contains module CmsHelper end Is it the case? Jej --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi there, Yip, that is exactly what it contains. Should every controller have an associated model? Thanks, Schalk Jej wrote:> > Hi, > > Your empty cms_helper.rb helper should contains > > module CmsHelper > end > > Is it the case? > > Jej > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Schalk Neethling wrote:> Expected C:/DEVELOPMENT/satechevents/app/helpers/cms_helper.rb to define > CmsHelperIn general, whenever that happens, spot-check the file with ruby app/helpers/cms_helper.rb script/runner app/helpers/cms_helper.rb Sometimes when the Magic Loader finds a syntax error inside a file, it throws the error away, then complains the file did not define its target class. Next, calling a controller CMSController gives me a bad feeling. Maybe Rails parses it correctly, but we always go with like CmsController. > Should every controller have an associated model? No; a controller is like a telephone operator switchboard. It just plugs models and views together so they can communicate. How are your unit tests doing? -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi there Phlip, Changing to Cms as apposed to CMS did the trick, thanks! Regards, Schalk Phlip wrote:> Schalk Neethling wrote: > >> Expected C:/DEVELOPMENT/satechevents/app/helpers/cms_helper.rb to define >> CmsHelper > > In general, whenever that happens, spot-check the file with > > ruby app/helpers/cms_helper.rb > script/runner app/helpers/cms_helper.rb > > Sometimes when the Magic Loader finds a syntax error inside a file, it throws > the error away, then complains the file did not define its target class. > > Next, calling a controller CMSController gives me a bad feeling. Maybe Rails > parses it correctly, but we always go with like CmsController. > > > Should every controller have an associated model? > > No; a controller is like a telephone operator switchboard. It just plugs models > and views together so they can communicate. > > How are your unit tests doing? >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---