Permalink
Browse files

moved to delete_if to be compatible with 1.8.7

  • Loading branch information...
1 parent 8197e39 commit f8252dceb1b7278c1f69b5877cb27d161043b2db ben committed Jan 20, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 .travis.yml
  2. +1 −1 lib/helpers.rb
View
@@ -2,5 +2,6 @@ rvm:
- 1.8.7
- 1.9.2
- 1.9.3
+ - ree
before_script: "sh -c 'cp database_example.yml database.yml'"
script: "bundle exec rake db:drop db:create db:migrate db:seed test"
View
@@ -51,7 +51,7 @@ def validate_associations
#check every parameter if it consists only of alphanumeric chars
def validate_only_alphanumeric
bad_params = []
- params.keep_if{|k,v| !v.kind_of?(Array)}.each do |k,v|
+ params.delete_if{|k,v| v.kind_of?(Array)}.each do |k,v|
if k == 'limit' or k == 'offset'
bad_params << k unless v.match(/^\d+$/) unless v.nil?
else

0 comments on commit f8252dc

Please sign in to comment.