easy_ml 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/easy_ml/model.rb +11 -2
- data/lib/easy_ml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c68319b0bcca7b83e1fb4a539a15b42ced62475f8c8ab7f6b9a7a164c3b02cea
|
4
|
+
data.tar.gz: 1a6a83e77ff7723c590ab1238ce12d80aa6aa15bb5897b95a738c0a00760fb48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e1e3fdcbae41205892d47be90407b982efdce329b54b635ea2870d141297780ce6f166ab1769f3d531bf51906ff25c17a2d1b8d6a8aed0ea4e1e12052ff8eec
|
7
|
+
data.tar.gz: 31b5b12f27734f44fa92015feb8e4ac5c868f38090c3244a90f15b83327427fc05f3d2a34446d1b64f11ba10903bb1b989e890b8a63381c3da2e5a1330b5f778
|
data/app/models/easy_ml/model.rb
CHANGED
@@ -1,9 +1,18 @@
|
|
1
1
|
require_relative "../../../lib/easy_ml/core/model"
|
2
2
|
module EasyML
|
3
3
|
class Model < ActiveRecord::Base
|
4
|
-
|
4
|
+
if ActiveRecord::Base.connection.data_source_exists?("easy_ml_models")
|
5
|
+
include EasyML::Core::ModelCore
|
5
6
|
|
6
|
-
|
7
|
+
self.table_name = "easy_ml_models"
|
8
|
+
else
|
9
|
+
# Placeholder if the table doesn't exist (keeps the file quiet)
|
10
|
+
def self.table_ready?
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
Rails.logger.info("Skipping EasyML::Model definition as the 'easy_ml_models' table doesn't exist.")
|
15
|
+
end
|
7
16
|
|
8
17
|
scope :live, -> { where(is_live: true) }
|
9
18
|
attribute :root_dir, :string
|
data/lib/easy_ml/version.rb
CHANGED