You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActiveRecord::StatementInvalid in FaqsController#create
PGError: ERROR: argument of WHERE must be type boolean, not type character varying
LINE 1: SELECT "faqs".* FROM "faqs" WHERE (ancestry) ORDER BY posit...
^
: SELECT "faqs".* FROM "faqs" WHERE (ancestry) ORDER BY position DESC LIMIT 1
The text was updated successfully, but these errors were encountered:
:scope in acts_as_list works just like it does in validates_uniqueness_of. i.e. if its a string, it is expected to be a SQL fragment. Can you try :scope => :ancestry and see if it works?
I think I found a fix from the ancestry wiki. I'm trying it out now, and so far it's working. I tried using :scope => :ancestry, but it didn't work for some reason which now escapes me.
I'm trying to use acts_as_list in combination with has_ancestry, but when I apply a scope it returns this:
Code: acts_as_list :scope => "ancestry" #string column
Returns:
ActiveRecord::StatementInvalid in FaqsController#create
PGError: ERROR: argument of WHERE must be type boolean, not type character varying
LINE 1: SELECT "faqs".* FROM "faqs" WHERE (ancestry) ORDER BY posit...
^
: SELECT "faqs".* FROM "faqs" WHERE (ancestry) ORDER BY position DESC LIMIT 1
The text was updated successfully, but these errors were encountered: