Hi Jonas,
Do all the tests run successfully for you?
Krishna
On 5/2/07, jonas <jonas at fkw.se> wrote:> I?ve been working on a site tree with multiple roots for a while now. I
just
> can?t figure out this error (that previously was mentioned here):
>
> Mysql::Error: You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use near
''?
> ? "site_id IS NULL" : "site_id = #{site_id}")''
at line 1: SELECT max(rgt) AS
> max_rgt FROM nodes WHERE (site_id.nil? ? "site_id IS NULL" :
"site_id > #{site_id}")
>
> My apps models:
>
> class Node < ActiveRecord::Base
> belongs_to :site
> acts_as_nested_set :scope => :site
> end
>
> class Site < ActiveRecord::Base
> has_many :nodes, :dependent => :delete_all
> end
>
> Columns in database:
> create_table "nodes", :force => true do |t|
> t.column "name", :string
> t.column "parent_id", :integer
> t.column "lft", :integer
> t.column "rgt", :integer
> t.column "site_id", :integer
> end
>
> What am I doing wrong?
>
>
> Best regards
> Jonas
>
> _______________________________________________
> Betternestedset-talk mailing list
> Betternestedset-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/betternestedset-talk
>
>