Skip to content

Instantly share code, notes, and snippets.

@kastner
Created August 31, 2012 00:23
Show Gist options
  • Save kastner/3546364 to your computer and use it in GitHub Desktop.
Save kastner/3546364 to your computer and use it in GitHub Desktop.
Tire patch to allow methods on the command line
--- tire/lib/tire/tasks.rb 2012-08-30 20:22:15.000000000 -0400
+++ tire-0.4.2/lib/tire/tasks.rb 2012-08-03 01:45:45.000000000 -0400
@@ -42,7 +42,7 @@
klass = eval(ENV['CLASS'].to_s)
params = eval(ENV['PARAMS'].to_s) || {}
- params.update :method => 'paginate'
+ params = {:method => 'paginate'}.update(params)
index = Tire::Index.new( ENV['INDEX'] || klass.tire.index.name )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment