On 6/6/2007, "Werner Laude" <[EMAIL PROTECTED]> wrote: >def new_comment > @comment = Comment.new > @blog = Blog.find(params[:id]) # Das steht hier damit ich den Eintrag >nochmal aufführen möchte und auch wegen der Zuordnungs id > end > > def create_comment > @comment = Comment.new(params[:comment]) > if @comment.save > flash[:notice] = 'Eintrag wurde gespeichert.' > redirect_to :controller => 'index' > else > render :action => 'new_comment' > end > end
Du renderst hier ja das new_comment Template das aber die @blog Variable braucht. Die setzt du in create_comment aber nicht. Urban _______________________________________________ rubyonrails-ug mailing list [email protected] http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug
