Skip to content

Instantly share code, notes, and snippets.

DEPRECATION WARNING: It looks like you are eager loading table(s) (one of: drafts, drafters) that are referenced in a string SQL snippet. For example:
Post.includes(:comments).where("comments.title = 'foo'")
Currently, Active Record recognizes the table in the string, and knows to JOIN the comments table to the query, rather than loading comments in a separate query. However, doing this without writing a full-blown SQL parser is inherently flawed. Since we don't want to write an SQL parser, we are removing this functionality. From now on, you must explicitly tell Active Record when you are referencing a table from a string:
Post.includes(:comments).where("comments.title = 'foo'").references(:comments)
If you don't rely on implicit join references you can disable the feature entirely by setting `config.active_record.disable_implicit_join_references = true`.
@asilano
asilano / masquerade.feature
Created May 31, 2012 12:30
Test for the "normal" case of Masquerade
Scenario: Playing Masquerade
Given my hand contains Masquerade, Curse and 3 other cards
And Bob's hand contains Estate and 4 other cards
And Charlie's hand contains Copper and 4 other cards
And my deck contains Gold x3
When I play Masquerade
Then I should have drawn 2 cards
And I should need to Pass a card to Bob
And Bob should need to Pass a card to Charlie
And Charlie should need to Pass a card to Alan