Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# frozen_string_literal: true
module Syncable
extend ActiveSupport::Concern
def as_json(params = {})
json = super(params)
json.each do |key, value|
if key == "id"
json[key] = value.to_s
end
end
{
id: id.to_s,
type: model_name.param_key,
attributes: json
}
end
end