Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
65167b45
Commit
65167b45
authored
9 years ago
by
Mauricio Giacomini Girardello
Browse files
Options
Downloads
Patches
Plain Diff
change OrientDb::Base#build_hash implementation
parent
84e60179
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/repositories/orient_db/base.rb
+3
-12
3 additions, 12 deletions
app/repositories/orient_db/base.rb
with
3 additions
and
12 deletions
app/repositories/orient_db/base.rb
+
3
−
12
View file @
65167b45
...
...
@@ -44,19 +44,12 @@ class OrientDb::Base
end
end
protected
# Take the object and make a hash in the OrientDB format.
# Used to create a document.
def
build_hash
(
object
)
hash
=
{
'@class'
=>
odb_class
}
object
.
instance_variables
.
each
do
|
var
|
var_name
=
sanitize_orientdb_vars
(
var
)
hash
[
var_name
]
=
sanitize_orientdb_values
(
object
.
instance_variable_get
(
var
))
end
hash
.
delete
(
'id'
)
# TODO: find a better way to ignore variables from ActiveModel
hash
.
delete
(
"validation_context"
)
hash
.
delete
(
"errors"
)
hash
object
.
to_orientdb_hash
end
def
build_objects
(
hash
=
[])
...
...
@@ -71,8 +64,6 @@ class OrientDb::Base
raise
NoMethodError
,
"You must implement this method"
end
protected
def
accepted_properties
raise
NoMethodError
,
"You must implement this method"
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment