effective_posts 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/post.rb +10 -7
- data/lib/effective_posts/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9d8e5570b02bb73d75d54a4b910001b9c1762c6fabe432169647c87b27e8192
|
4
|
+
data.tar.gz: 41e7bb371e0e9e35199cbc4f756861c38bb06a73c737839a31d84a33429a1215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29142f4e9ba9cf43ccef2f15b4dc555c54c7962a89df168d058a09a1ac8e3cd52e4e0010ddfacd902ae426c41d11a967a067a4ffd0acea9e2064ffac2b2ec7e4
|
7
|
+
data.tar.gz: 80480ad18d597104970d8356afb629067a2dd459a9344234e128e5ab406c858e1291916f2b4f13cb07229709c24af9faf67c7cd50ab84d6c42b27049f2d2add4
|
@@ -125,14 +125,17 @@ module Effective
|
|
125
125
|
|
126
126
|
# Returns a duplicated post object, or throws an exception
|
127
127
|
def duplicate
|
128
|
-
Post.new(attributes.except('id', 'updated_at', 'created_at'))
|
129
|
-
post.title = post.title + ' (Copy)'
|
130
|
-
post.slug = post.slug + '-copy'
|
131
|
-
post.draft = true
|
128
|
+
post = Post.new(attributes.except('id', 'updated_at', 'created_at', 'tags'))
|
132
129
|
|
133
|
-
|
134
|
-
post.
|
135
|
-
|
130
|
+
post.assign_attributes(
|
131
|
+
title: post.title + ' (Copy)',
|
132
|
+
slug: post.slug + '-copy',
|
133
|
+
draft: true,
|
134
|
+
body: body,
|
135
|
+
excerpt: excerpt
|
136
|
+
)
|
137
|
+
|
138
|
+
post
|
136
139
|
end
|
137
140
|
|
138
141
|
def duplicate!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_posts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|