CRUD API ready
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
class ApplicationRecord < ActiveRecord::Base
|
||||
self.abstract_class = true
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module Response
|
||||
def json_response(object, status = :ok)
|
||||
render json: object, status: status
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
class Homie < ApplicationRecord
|
||||
has_many :money_moves_from, class_name: 'MoneyMove', column: :from_homie_id
|
||||
has_many :money_moves_to, class_name: 'MoneyMove', column: :to_homie_id
|
||||
has_many :money_moves_from, class_name: 'MoneyMove', foreign_key: :from_homie_id
|
||||
has_many :money_moves_to, class_name: 'MoneyMove', foreign_key: :to_homie_id
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user