lib/wechat/concern/common.rb
Use params[:description] = opts.slice(:title, :introduction).to_json
instead of params.merge!(description: opts.slice(:title, :introduction).to_json)
. Open
Open
params.merge!(description: opts.slice(:title, :introduction).to_json) if type == 'video'
- Read upRead up
- Exclude checks
This cop identifies places where Hash#merge!
can be replaced by
Hash#[]=
.
Example:
hash.merge!(a: 1)
hash.merge!({'key' => 'value'})
hash.merge!(a: 1, b: 2)