update code syntax for rails 4
find_by
find_or_initialize_by
find_or_create_by
client.users.find_by_user_id_and_organisation_id(current_user.id, current_user.organisation.id).update(:enabled, true)
#=>
client.users.find_by(user_id: current_user.id, organisation_id: current_user.organisation.id).update(:enabled, true)
rails4_upgrade_syntax.rb <target folder or file>
Or
ruby rails4_upgrade_syntax.rb <target folder or file>
- Processed by lines
- accepting parentheses inside find_xP_by()