Require it explicitly from the extension file ? Sent from my iPhone
On 23 Nov 2008, at 20:31, Alex Sonar <[EMAIL PROTECTED] s.net> wrote: > > Fred, > > I really appreciate your help. The following works like a charm. > > silencio:alias u2$ script/console > Loading development environment (Rails 2.2.2) >>> require 'app/helpers/alias.rb' > => ["XYZ"] >>> require 'app/views/alias_ext.rb' > => [] >>> XYZ.new 1,2 > before chain > in Alias constructor > after chain > => #<XYZ:0x259c73c @value=2, @name=1> > > But having this in mind, how do I ensure that my 'app/helpers/ > alias.rb' > is loaded BEFORE any extended classes? Sorry if this a really newbie > question.. > > Alex > > > Frederick Cheung wrote: >> The problem here is that the "normal" XYZ in xyz.rb is never loaded >> so >> you're trying to call Object's initialize, which does not take 2 >> arguments >> >> Fred >> >> Sent from my iPhone >> >> On 23 Nov 2008, at 18:52, Alex Sonar <[EMAIL PROTECTED] > > -- > 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---