Acctually it was just because I had another variable called catagory. Soz i took so long to reply.
Ive basically sorted all out now (by myself thank you very much), soz for wasted thread. Thanks, Joe On Sep 18, 9:12 am, Peter De Berdt <[email protected]> wrote: > No, the problem is that in his form_for he didn't pass in a Category > object, but a string. > > form_for :category do |f| > > @category should exist and be a Category model instance. The error > pops up because the variable there apparently is just a string. > > On 17 Sep 2009, at 21:31, Eric wrote: > > > > > Is the category_id datatype a string rather than an integer? Check > > your migrations. > > > -eric > > > On Sep 17, 9:18 am, Joe <[email protected]> wrote: > >> Ive posted the following on various forums and had no reply, and was > >> told this was the place were i could get an answer: > > >> Hi, As you may know I currently own and maintain dev-hq.co.uk, and > >> basically ive been trying to "convert" everythig to RoR as ive been > >> told this could benifit me in many ways. I asked a friend who is good > >> in RoR to help me, and we managed to create an application which does > >> basically everything its supposed to. However just before finishing > >> the project he got bored of helping me time and time again, so there > >> are some unfinished bits which I was hoping you could help with. > >> First > >> off im going to talk about an error I get when trying to edit/create > >> new tutorials in a certain catagory. This is the error I get: > > >> Category(#47881910) expected, got String(#32601110) > > >> Ive looked everywhere for this and cant find a fix that works. Now > >> because I dont want to have to post things I dont need too, Im just > >> going to post the thing that I put in new and edit to get the > >> catagory > >> box to appear (on creation or edit its looking for the catagory > >> number > >> by the way): > > >> <p> > >> <%= f.label :category_id %> > >> <%= f.text_field :category_id %> > >> </p> > > Best regards > > Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

