Replace :key => with key: using vim
%s/\:\(\w\+\)\(\s\+\)=>\s\+/\1:\2/g
Example:
post :create, :app => { :name => "mario", :nested_attributes => { :value => "value1" } }
Result:
post :create, app: { name: "mario", nested_attributes: { value: "value1" } }
Written by Alexandr Korsak
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#