I tried adding

super( runtime_args, runtime_options )

and still got this error:

rails_generator/base.rb:107:in `initialize': You have a nil object when 
you didn't expect it!

my overidden initialize method now looks like this:


def initialize(runtime_args, runtime_options = {})
  super( runtime_args, runtime_options )
end



Conrad Taylor wrote:
> On Wed, Jun 3, 2009 at 7:58 PM, Conrad Taylor <[email protected]> 
> wrote:
> 
>>>
>>>    @args = runtime_args
>>> '/generators/media_module'
>>>     super
>>>  end
>>> end
>>>
>>
>> If you're overriding the initialize method, then you should be
>> calling super before any other expression.  This isn't necessary
>> in regards to subclasses who parent is Object.
>>
> 
> You should have an expression like this in your subclass:
> 
> super( runtime_args, runtime_options )
> 
> If you need further details, please consult the PixAxe book.
> 
> -Conrad

-- 
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to