Hi all,

I have a basic model as follow, but when I try to query the database, I
get the following error:

'wrong number of arguments (0 for 2)'

I don't see any problem, I am becoming crazy o_O'


Migration
---------
class CreateSubtasks < ActiveRecord::Migration
  def self.up
    create_table :subtasks do |t|
      t.string  :hostname, :type
      t.integer :task_id
    end
  end

  def self.down
    drop_table :subtasks
  end
end

Model
-----
class Subtask < ActiveRecord::Base
  belongs_to :task
end


Code causing the error
-------------------------------
This doesn't work: Subtask.find(:all)
This work: @toto = Subtask.new

I can add subtasks but not query them :S
-- 
Posted via http://www.ruby-forum.com/.

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