Acts_as_list with the scope on boolean field

I have a boolean field in mysql (tinyint) which I want to use as a
scope restriction for acts_as_list

acts_as_list :scope => ‘featured = #{featured}’

however, there is a problem here as when Rails generates SQL query for
this it supplements true/false for #{featured} which raises error in

As a workaround I created dummy attributes that return 1/0 depending
on featured being true/false.

The question is, whether this is a bug or not? I would assume
ActiveRecord should not use true/false if mysql does not understand

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs