x7m6dq
Last Updated: February 25, 2016
·
396
· oivoodoo

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" } }