Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paranoia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paranoia
Commits
f63ccc7f
Commit
f63ccc7f
authored
Jan 18, 2015
by
John Hawthorn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify restore_associated_records
parent
723ec506
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/paranoia.rb
+2
-2
No files found.
lib/paranoia.rb
View file @
f63ccc7f
...
...
@@ -142,8 +142,8 @@ module Paranoia
end
if
association_data
.
nil?
&&
association
.
macro
.
to_s
==
"has_one"
association_class_name
=
association
.
options
[
:class_name
].
present?
?
association
.
options
[:
class_name
]
:
association
.
name
.
to_s
.
cameliz
e
association_foreign_key
=
association
.
foreign_key
.
present?
?
association
.
foreign_key
:
"
#{
self
.
class
.
name
.
to_s
.
underscore
}
_id"
association_class_name
=
association
.
class_nam
e
association_foreign_key
=
association
.
foreign_key
if
association
.
type
association_polymorphic_type
=
association
.
type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment