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
ed5481d8
Commit
ed5481d8
authored
Jul 20, 2020
by
Ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change args order
parent
d104ce11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
pastable.rb
lib/acts_as_pasting/pastable.rb
+1
-1
pasted.rb
lib/acts_as_pasting/pasted.rb
+1
-1
No files found.
lib/acts_as_pasting/pastable.rb
View file @
ed5481d8
...
...
@@ -32,7 +32,7 @@ module ActsAsPasting
end
module
ClassMethods
def
acts_as_pastable
associations
,
options
=
{},
prefix:
''
def
acts_as_pastable
associations
,
prefix:
''
,
**
options
pasting_name
=
prefix
.
blank?
?
:
pastings
:
[
prefix
,
'pastings'
].
join
(
'_'
).
to_sym
has_many
pasting_name
,
as: :pasteable
,
class_name:
'ActsAsPasting::Pasting'
has_many
associations
,
through:
pasting_name
,
source: :pasted
,
**
options
...
...
lib/acts_as_pasting/pasted.rb
View file @
ed5481d8
...
...
@@ -201,7 +201,7 @@ module ActsAsPasting
end
end
def
acts_as_pasted
associations
,
options
=
{},
prefix:
''
def
acts_as_pasted
associations
,
prefix:
''
,
**
options
pasting_name
=
prefix
.
blank?
?
:
pastings
:
[
prefix
,
'pastings'
].
join
(
'_'
).
to_sym
has_many
pasting_name
,
->
{
where
(
type:
prefix
)
},
class_name:
'ActsAsPasting::Pasting'
,
as: :pasted
has_many
associations
,
through:
pasting_name
,
source: :pasteable
,
**
options
...
...
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