Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
acts_as_pasting
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
acts_as_pasting
Commits
896f6f72
Commit
896f6f72
authored
May 10, 2020
by
Ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pasting type logic
parent
6402d2ab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
1 deletion
+2
-1
1_create_acts_as_pasting_pastings.rb
db/migrate/1_create_acts_as_pasting_pastings.rb
+0
-1
pasted.rb
lib/acts_as_pasting/pasted.rb
+0
-0
pasting.rb
lib/acts_as_pasting/pasting.rb
+2
-0
No files found.
db/migrate/1_create_acts_as_pasting_pastings.rb
View file @
896f6f72
...
...
@@ -4,7 +4,6 @@ class CreateActsAsPastingPastings < ActiveRecord::Migration[5.2]
t
.
references
:pasteable
,
polymorphic:
true
,
index:
{
name:
'acts_as_pasting_pasteable'
}
t
.
references
:pasted
,
polymorphic:
true
,
index:
{
name:
'acts_as_pasting_pasted'
}
t
.
string
:type
,
index:
true
t
.
string
:pasting_type
t
.
timestamps
end
...
...
lib/acts_as_pasting/pasted.rb
View file @
896f6f72
This diff is collapsed.
Click to expand it.
lib/acts_as_pasting/pasting.rb
View file @
896f6f72
...
...
@@ -20,6 +20,8 @@
#
module
ActsAsPasting
class
Pasting
<
ApplicationRecord
self
.
inheritance_column
=
:_type_disabled
belongs_to
:pasteable
,
polymorphic:
true
belongs_to
:pasted
,
polymorphic:
true
end
...
...
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