Permalink
Browse files

fix Active Record choking on a core ext from Sequel

  • Loading branch information...
1 parent 71f793e commit cc3563731ecaf1bed7da998522edf0cf4f345297 @mislav committed Nov 6, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/finders/sequel_test_connector.rb
@@ -1,5 +1,11 @@
require 'sequel'
+Symbol.class_eval do
+ # Active Record calculations tries `as` on some objects but chokes when that
+ # object was a Symbol and it gets a Sequel::SQL::AliasedExpression.
+ undef as if method_defined? :as
+end
+
db = Sequel.sqlite
db.create_table :cars do

0 comments on commit cc35637

Please sign in to comment.