I have a couple of objects in a Rails app ("Ticket", and "Comment")

class Ticket < ActiveRecord::Base
  has_many    :attributes
  has_many    :comments
end

class Comment < ActiveRecord::Base
  belongs_to :ticket
  belongs_to :user
end
with the following schema:

create_table "comments", :force => true do |t|
  t.integer  "ticket_id"
  t.integer  "user_id"
  t.text     "content"
  t.datetime "created_at"
  t.datetime "updated_at"
end

create_table "tickets", :force => true do |t|
  t.integer  "site_id"
  t.integer  "status"
  t.integer  "user_id"
  t.datetime "created_at"
  t.datetime "updated_at"
end
However, for some reason - whenever I do a @lead.comments I get a
crash:

can't convert String into Integer

Any ideas? This is driving me nuts!

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