Add model Codelike and controller Codelikes to allow liking of code

rails generate model Codelike
rails generate controller Codelikes

Model Codelike
t.integer :code_id
t.string :username

code.rb
has_many :codelikes

codelike.rb
beloings_to :code