2009/10/6 Bryan L <[email protected]>:
>
> My bad.. I regenerated the controllers and models and the previous
> error seemed to be gone but now I'm getting this error instead:
>
> Called id for nil, which would mistakenly be 4 -- if you really wanted
> the id of nil, use object_id
>
> If I understand correctly, this statement "<% form_for([:admin,
> @design]) do |f| %> " is trying to call the @design model with a nil
> id, which results in this error. That seems inevitable as I'm trying
> to create a new design through this form.

If the error occurred on that line then it suggests @design is nil
(@design is not a model it is a variable).  You should set this up in
your 'new' action before displaying the view.  Something like @design
= Design.new.

If this does not make sense then, if you have not done so already,
have a look at the rails guide Getting Started. See
http://guides.rubyonrails.org/

Colin

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