use ActiveRecord::Base.connection.quoted_true instead of true in donditional because sqlite and mysql are not compatable on booleans