preston/bittorious

View on GitHub
app/models/torrent.rb

Summary

Maintainability
A
1 hr
Test Coverage

Method register_peer has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def register_peer(peer_params, user = nil)
        torrent = Torrent.where(info_hash: peer_params[:info_hash]).first
        peer = Peer.find_or_create_by!(torrent_id: torrent, peer_id: peer_params[:peer_id])
        peer.torrent = torrent
        peer.update_attributes(
Severity: Minor
Found in app/models/torrent.rb - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status