Plugins - Has Params
Add to favoritesThis plugin allows you to stop checking parameters via the params hash, in favor of a much cleaner alternative.
What’s the point?
Really, there is no point. And I wouldn’t be surprised if I were the only one to think this is worthy of using, but here it is anyway. Have you ever written a line of code similar to this?
Project.new(params[:project]) unless params[:project].blank?
To me, the params[:project].blank? part stinks up that line. So, I got rid of it. With has_params, you can do this instead:
Project.new(params[:project]) unless blank_project_params?
Much better.
http://rpheath.com/posts/326-rails-plugin-has-params
http://github.com/rpheath/has_params/tree/master
Rails' (MIT)
Controllers
