The latest news in the Ruby and Rails community.

Subscribe to our mailing list!

Episode #377

June 11th, 2013

RubyGems paranoia, unexpected chained scopes in Rails 4, Rubberband flamethrowers, Stripe with Rails, and efficient Git pairing.


Chaining Scopes in Rails 4

On the Envy Labs blog, Carlos Souza talks about the surprising new behavior of ActiveRecord scopes in Rails 4. It’s possible to chain scopes in Rails, which means the scopes will be combined to create a specific query that satisfies all the conditions. To keep it simple, in the situation where you might have 2 scopes involving the same column, Rails used to play dumb and ignore the first condition altogether. In Rails 4, this behavior changes and the two conditions are combined with an “AND” SQL statement.

Visit site → Permalink

Previous Episodes

Episode #376

Interact with GitHub through Octokit, choosing a European payment gateway, importing and exporting databases with DbSync, pluck values from your tables, using ember-auth with Rails 3 and Authlogic, and field-level access control with Protector all in this episode of Ruby5!

Episode #375

Wiselinks ... Code Smells ... Step by Step Rails ... Wrapping a C library in Ruby ... rack-showme ... ORUCO Streaming

Episode #374

RSpec's New Message Expectation Syntax ... Version Cake ... Login with Amazon ... Sass style guide ... Sass Namespaces ... "Naught" and nice

Episode #373

Confreaks releases all the RailsConf videos, Yehuda extends browsers, JetRockets releases Attrio, and RubyLearning offers a pay-what-you-like training on this episode of Ruby5.

View the archives →

Looking to learn about Ruby? Take a look at the Ruby Path on Code School

This podcast is produced and distributed by Code School. Copyright © 2015 Code School LLC