Thanks for the reply, but figured it out.

I didn't give much helpful info, I know, it was the nil.clear that I
couldn't find any info on anywhere, spent ages searching and was
hoping it might just twig something with someone.

The problem was, I was overwriting model methods I shouldn't with one
of my modules.

I understand OO, MVC, and don't intend to continue writing, what was
basically, a bunch of boiler plate code in my models due to the DB
tables following the same formats, so I am refactoring with the help
of Metaprogramming Ruby (after having spent a lot of time with AWDwR
and Pickaxe + a few others). It has taught me a lot about Ruby, and
has helped me reduce masses of lines of code into just a few small
modules - just got caught by unknowingly MonkeyPatching.

Thanks again

Paul

On Feb 24, 9:08 am, Michael Pavling <[email protected]> wrote:
> On 23 February 2010 23:49, paul h <[email protected]> wrote:
>
> > NoMethodError (You have a nil object when you didn't expect it!
> > You might have expected an instance of Array.
> > The error occurred while evaluating nil.clear):
>
> If you post code extracts from around the area that seems to be
> failing, we might be able to help.
>
> > Have I missed something with 'self'?
>
> I've no idea, that's the first time you've mentioned it, so we don't
> know what kind of grasp you think you have to be able to suggest
> anything you may have missed.
>
> > just finished reading Metaprogramming Ruby
>
> That might be a little bit beyond the position you're at at the
> moment, maybe a book that offers a better grounding would be more
> appropriate; like "Ruby for Rails" (http://www.manning.com/black/)

-- 
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