Skip to content

Loading…

Fixes arity problem introduced by rails 3.2.5 #1

Closed
wants to merge 2 commits into from

2 participants

@dball

Rails 3.2.5 changed the arity of a method you're alias_method_chaining. This patch corrects that. Sadly, this doesn't seem to be exercised by the test suite anywhere, but I can verify it was broken, and now works, when integrated with a real-world app. :)

@metaskills metaskills added a commit that closed this pull request
@metaskills Fixes arity problem introduced by rails 3.2.5. Fixes #1
* Also master is now 3.2 only.
387a131
@metaskills
Owner

So odd, the test suite does exercise that method because if you comment out the guts, one fails. Odd. I've pushed v3.2.0 with this. Thanks.

@metaskills metaskills reopened this
@metaskills
Owner

Had to be persnickety and make the arg name match. No need to upgrade, but 3.2.1 is out.

@metaskills metaskills closed this
@dball

Our future selves appreciate your careful attention to detail; names are important. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 11, 2012
  1. @dball

    Updates to rails 3.2.5

    dball committed
  2. @dball
Showing with 4 additions and 4 deletions.
  1. +1 −1 Gemfile
  2. +1 −1 Gemfile.rails-3.2
  3. +2 −2 lib/grouped_scope/arish/relation/predicate_builer.rb
View
2 Gemfile
@@ -1 +1 @@
-eval File.read('Gemfile.rails-3.1')
+eval File.read('Gemfile.rails-3.2')
View
2 Gemfile.rails-3.2
@@ -6,4 +6,4 @@ deps = spec.dependencies.map { |dep| {:name => dep.name, :version => dep.require
deps.reject! { |dep| dep[:name] =~ /activerecord/ }
deps.each { |dep| gem dep[:name], dep[:version] }
-gem 'activerecord', '3.2.0.rc1'
+gem 'activerecord', '3.2.5'
View
4 lib/grouped_scope/arish/relation/predicate_builer.rb
@@ -10,12 +10,12 @@ module PredicateBuilder
module ClassMethods
- def build_from_hash_with_grouped_scope(engine, attributes, default_table)
+ def build_from_hash_with_grouped_scope(engine, attributes, default_table, check_column = true)
attributes.select{ |column, value| GroupedScope::SelfGroupping === value }.each do |column_value|
column, value = column_value
attributes[column] = value.arel_table[column.to_s].in(value.ids_sql)
end
- build_from_hash_without_grouped_scope(engine, attributes, default_table)
+ build_from_hash_without_grouped_scope(engine, attributes, default_table, check_column)
end
end
Something went wrong with that request. Please try again.