mardi 10 mai 2016

Rails where syntax change from Rails 3 to 4?

In Rails 3, I have this code:

def self.active
      includes(configuration_slots: [:configuration])
        .where("configurations.is_active = 't'")
end

Is this not allowed anymore in Rails 3? Why not? What's the reason?

I have to write this now:

where(configurations: { is_active: true })

Aucun commentaire:

Enregistrer un commentaire