effective_posts 0.6.0 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/admin/posts_controller.rb +2 -2
- data/app/controllers/effective/posts_controller.rb +1 -1
- data/app/helpers/effective_posts_helper.rb +1 -1
- data/app/models/effective/post.rb +1 -2
- data/app/views/effective/posts_mailer/post_submitted_to_admin.html.haml +2 -2
- data/lib/effective_posts/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca0ef37ecec36ad5e970fbf822f04bba0b3467a5e742bf9e58e50848ed245dee
|
4
|
+
data.tar.gz: 7161bb9f8b1fffd7cbdc371dca5d6f116b25fcbb50003ba23c424d0b9b6fe1ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63c223415032de3e6e7ab000c9f5be639dcb2c449ca7ced5e0ef4a6474afc0562b63d3e9a29c3ddb57900804f0443a0c12bd55d70551d360db8ebfdbcb0b31bf
|
7
|
+
data.tar.gz: 8d858bd780ccb72acaf7c7c2f085590bab412e3f7bbb84133f9121c0015877c69317cebebb401103b3ab6306b42563bc7a1a9701c6c9704da2d2940a88af3f8c
|
@@ -60,7 +60,7 @@ module Admin
|
|
60
60
|
|
61
61
|
authorize_effective_posts!
|
62
62
|
|
63
|
-
if @post.
|
63
|
+
if @post.update(post_params)
|
64
64
|
if params[:commit] == 'Save and Edit Content'
|
65
65
|
redirect_to effective_regions.edit_path(effective_posts.post_path(@post), :exit => effective_posts.edit_admin_post_path(@post))
|
66
66
|
elsif params[:commit] == 'Save and Add New'
|
@@ -107,7 +107,7 @@ module Admin
|
|
107
107
|
|
108
108
|
authorize_effective_posts!
|
109
109
|
|
110
|
-
if @post.
|
110
|
+
if @post.update(draft: false)
|
111
111
|
flash[:success] = 'Successfully approved post. It is now displayed on the website.'
|
112
112
|
else
|
113
113
|
flash[:danger] = "Unable to approve post: #{@post.errors.full_messages.join(', ')}"
|
@@ -8,7 +8,7 @@ module EffectivePostsHelper
|
|
8
8
|
if EffectivePosts.use_category_routes
|
9
9
|
effective_posts.post_path(post, opts).sub('/posts', "/#{category}")
|
10
10
|
else
|
11
|
-
effective_posts.post_path(post, opts
|
11
|
+
effective_posts.post_path(post, opts)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -33,7 +33,6 @@ module Effective
|
|
33
33
|
|
34
34
|
scope :drafts, -> { where(draft: true) }
|
35
35
|
scope :published, -> { where(draft: false).where("#{EffectivePosts.posts_table_name}.published_at < ?", Time.zone.now) }
|
36
|
-
scope :with_category, -> (category) { where(category: category.to_s.downcase) }
|
37
36
|
|
38
37
|
scope :posts, -> (user: nil, category: nil, drafts: false) {
|
39
38
|
scope = (Rails::VERSION::MAJOR > 3 ? all : scoped)
|
@@ -48,7 +47,7 @@ module Effective
|
|
48
47
|
end
|
49
48
|
|
50
49
|
if category.present?
|
51
|
-
scope = scope.
|
50
|
+
scope = scope.where(category: category)
|
52
51
|
end
|
53
52
|
|
54
53
|
if drafts.blank?
|
@@ -1,6 +1,6 @@
|
|
1
1
|
%p A new post has been submitted and needs your approval before it may be displayed on the website:
|
2
2
|
|
3
|
-
%p= link_to 'Approve Post', effective_posts.
|
3
|
+
%p= link_to 'Approve Post', effective_posts.admin_approve_post_url(@post)
|
4
4
|
|
5
5
|
%hr
|
6
6
|
|
@@ -19,4 +19,4 @@
|
|
19
19
|
|
20
20
|
%hr
|
21
21
|
|
22
|
-
%p= link_to 'Approve Post', effective_posts.
|
22
|
+
%p= link_to 'Approve Post', effective_posts.admin_approve_post_url(@post)
|
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: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -188,7 +188,7 @@ homepage: https://github.com/code-and-effect/effective_posts
|
|
188
188
|
licenses:
|
189
189
|
- MIT
|
190
190
|
metadata: {}
|
191
|
-
post_install_message:
|
191
|
+
post_install_message:
|
192
192
|
rdoc_options: []
|
193
193
|
require_paths:
|
194
194
|
- lib
|
@@ -203,8 +203,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
|
-
rubygems_version: 3.
|
207
|
-
signing_key:
|
206
|
+
rubygems_version: 3.1.2
|
207
|
+
signing_key:
|
208
208
|
specification_version: 4
|
209
209
|
summary: A blog implementation with WYSIWYG content editing, post scheduling, pagination
|
210
210
|
and optional top level routes for each post category.
|