Yes it's possible. In Rails 4 however, you need to use lambda scope and not eagerly load the conditions as you've done.
Try:
scope :in_session, -> { joins(:class_section).where('? between class_sections.begins and class_sections.ends', Time.now) }
Your table name class_section
is singular as you've shown your scope, it should be plural class_sections
unless you've explicitly specified it to be singular. I've used plural class_sections
in the scope above, update it to singular class_section
if your table name is singular.