remove default chip from homies

This commit is contained in:
Bilal
2020-09-18 01:30:01 +03:00
committed by Senad Uka
parent c574d77918
commit a8b836b03f
3 changed files with 6 additions and 3 deletions

View File

@@ -45,8 +45,7 @@ class HomiesController < ApplicationController
params.require(:homie).permit(
:name,
:importance,
:about,
:chip_id
:about
)
end
end

View File

@@ -1,7 +1,6 @@
class Homie < ApplicationRecord
has_many :money_moves
has_many :work
belongs_to :chip
def self.cash(importance)
totals = Homie.all.joins(:money_moves).group(:id).order(:id).sum(:amount)

View File

@@ -0,0 +1,5 @@
class RemoveDefaultChipFromHomies < ActiveRecord::Migration[5.2]
def change
remove_reference :homies, :chip
end
end