Ruby on Rails Friday, March 3, 2017


I'm not sure why I'm getting this... I'm trying to update a product in the ruby console (and tried it within my app).








Product.update(122, :funded => true)


  Product Load (1.6ms)  SELECT  "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1  [["id", 122]]


   (0.1ms)  SAVEPOINT active_record_1


  Commontator::Thread Load (1.6ms)  SELECT  "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1  [["commontable_id", 122], ["commontable_type", "Product"]]


   (0.1ms)  ROLLBACK TO SAVEPOINT active_record_1


NoMethodError: undefined method `Startdate' for #<Product:0x007f9588a84330>


Did you mean?  startdate


               startdate?


               startdate=


               startdate_was


               startdate_change


               startdate_changed?


               Startdate=


from /Users/joeguerra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activemodel-4.2.5/lib/active_model/attribute_methods.rb:433:in `method_missing'


At one point my table for product had a 'Startdate' column, but I ran a migration to change that column to all lowercase.

any ideas?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0b81c0c0-7281-474d-a380-b4db60c01892%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment