From 114a17ff0f8f33f296f2035bddf5c6ff17972dd8 Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Wed, 7 Dec 2016 16:57:17 +0100 Subject: [PATCH] change to create --- app/models/custom_field.rb | 2 +- app/models/user_organization.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 0aaf5debe..10dd39395 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -15,7 +15,7 @@ class CustomField < ActiveRecord::Base class_name: 'User' has_many :sample_custom_fields, inverse_of: :custom_field - def self.new(opt) + def self.create(opt) user = opt[:user] org = opt[:organization] samples_table = SamplesTable.where(user: user, diff --git a/app/models/user_organization.rb b/app/models/user_organization.rb index 5b1fc990b..eaf7a783e 100644 --- a/app/models/user_organization.rb +++ b/app/models/user_organization.rb @@ -15,7 +15,7 @@ class UserOrganization < ActiveRecord::Base I18n.t("user_organizations.enums.role.#{role.to_s}") end - def self.new(opt) + def self.create(opt) user = opt[:user] org = opt[:organization] org_status = SampleDatatable::SAMPLES_TABLE_DEFAULT_STATE.deep_dup