remove default chip from homies
This commit is contained in:
@@ -45,8 +45,7 @@ class HomiesController < ApplicationController
|
|||||||
params.require(:homie).permit(
|
params.require(:homie).permit(
|
||||||
:name,
|
:name,
|
||||||
:importance,
|
:importance,
|
||||||
:about,
|
:about
|
||||||
:chip_id
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
class Homie < ApplicationRecord
|
class Homie < ApplicationRecord
|
||||||
has_many :money_moves
|
has_many :money_moves
|
||||||
has_many :work
|
has_many :work
|
||||||
belongs_to :chip
|
|
||||||
|
|
||||||
def self.cash(importance)
|
def self.cash(importance)
|
||||||
totals = Homie.all.joins(:money_moves).group(:id).order(:id).sum(:amount)
|
totals = Homie.all.joins(:money_moves).group(:id).order(:id).sum(:amount)
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class RemoveDefaultChipFromHomies < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
remove_reference :homies, :chip
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user