On Nov 28, 7:07 am, Valentino Lun <[EMAIL PROTECTED]>
wrote:
> Dear all
>
> I type the following command in script/console and got the error
> "ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError: JZ0NK:
> ......Statement.NO_GENERATED_KEYS"
>
> It is quit strange that the title is nil when I saved the record....This
> problem only happened in the rails console. It is no problem in my irb.
> Please help me. Thank you.
>
Your attr_accessor :title is messing things up. You do not need that
for attributes defined in the database. Furthermore attributes are not
stored in instance  variables so doing @title = 'foo' is a waste of
time

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

Reply via email to