Eric-Guo/wechat

View on GitHub
lib/wechat/concern/common.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Use params[:description] = opts.slice(:title, :introduction).to_json instead of params.merge!(description: opts.slice(:title, :introduction).to_json).
Open

        params.merge!(description: opts.slice(:title, :introduction).to_json) if type == 'video'
Severity: Minor
Found in lib/wechat/concern/common.rb by rubocop

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)

There are no issues that match your filters.

Category
Status