pparams is ridiculously simple rails plugin that aliases params to p.
Instead of
user = User.find_by_email( params[:email] )
you can use
user = User.find_by_email( p[:email] )
But I often find myself with one-liners, with mutiple calls to params, that don’t fit on a single line, and that bugs me.
For example, this doesn’t fit indented, without pparams, in 80 columns:
user = User.new(:email => p[:email_new], :password => p[:password_new])
The ruby function p, which is like puts with inspect, isn’t that useful in rails, so its no big deal to overwrite it, especially since I use clog for logging.
Copyright © 2010 Kevin Swope. See LICENSE for details.