Problem beim Speichern mit Polymorphe Assoziation

Hallo,

ich habe eine Polymorphe Assoziation zwischen dem Model “Report” und den
Models “Profile” und “Comment”.

class Report < ActiveRecord::Base
belongs_to :reportable, :polymorphic => true
end

class Profile < ActiveRecord::Base
has_many :reports, :as => :reportable, :dependent => :destroy
end

class Comment < ActiveRecord::Base
has_many :reports, :as => :reportable, :dependent => :destroy
end

Beim Anlegen eines neuen Eintrags mit der Assoziation “Profile”
funktioniert alles. Nur mit der Assoziation “Comment” gibt es Probleme.
Wenn ich das erste Mal einen neuen Eintrag (mit der Assoziation Comment)
speichere, funktioniert alles (der Eintrag wird auch korrekt in der DB
gespeichert). Aber alle weiteren Versuche einen neuen Eintrag anzulegen,
schlagen fehl:
Zitat:
NoMethodError (You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.include?):
app/controllers/reports_controller.rb:17:in `create’

Rendered rescues/_trace (109.3ms)
Rendered rescues/_request_and_response (0.4ms)
Rendering rescues/layout (internal_server_error)

Mein Code an dieser Stelle (im Reports Controller)

@comment = Comment.find(params[:comment_id])
@report = @comment.reports.build(params[:report]) # Hier sitzt der
Fehler

Was mich wundert ist, dass es das Problem nur mit der Assoziation
“Comment” das Problem gibt und nicht mit der Assoziation “Profil”. Kann
es vielleicht sein, dass es daran liegt, das “Comment” selber eine
Polymorphe Assoziation besitzt (das ist das Plugin acts_as_commentable)?

Meine Rails Version ist die 2.3.2

Grüße,
Christian