effective_posts 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a1c81f231ae730f44dcbbfb64bead77d9a2530a3b6f4e2bdea6455f5ea78ca2
4
- data.tar.gz: 0ef00c73d74471e23a06c322444f209ab58fd21fce475a9783ecc93e8dadc011
3
+ metadata.gz: 7535e6aaa66d07e7184ca26b3d747f2d5991f43ed8a1f69a2d3c43252262d845
4
+ data.tar.gz: a12c21200c2c4c1ce0cc1405effb3041b744eb95f4b5fbd6ad94bf0ad3cef4b5
5
5
  SHA512:
6
- metadata.gz: 4eb6a0e3530b97ba6cd1679c4bb137dfe91937806ca6284a016a930509e416e49fed55ec489af4753aec4d0fcd783e5bcf88ca9bc62c6f629fddaa3c4f2fc442
7
- data.tar.gz: 600dec645eb265e938d44315ecf2299755bbc678d8d0e8535fc690eff63867a0b884d3612b1b56c70403b6afeb844cf34c0b918be07020ae825458462598d8de
6
+ metadata.gz: d3bc4dc919c8534c7e58db16e468ae8a73d7aec620e05821e443b190768643752cad76bd2eab3826e44e74a5d809b966104574c29c88dbeefd9da70400f8773d
7
+ data.tar.gz: 1a213e13af145cbc11344c9cc354381d2db2813eb4b64c10424e1330c144c252f4cba6303e3e030152e237d4bc9edc548a3be61e5f90af03ab8412244dd1d1da
@@ -6,22 +6,8 @@
6
6
  - else
7
7
  = f.hidden_field :category, value: (EffectivePosts.categories.first || 'posts')
8
8
 
9
- -# acts_as_published
10
- = f.hide_if(:save_as_draft, true) do
11
- .row
12
- .col-md-6
13
- = f.datetime_field :published_start_at, label: 'Published start', hint: 'The page will appear on the website after this date and time. Leave blank to publish immediately'
14
- .col-md-6
15
- = f.datetime_field :published_end_at, label: 'Published end', hint: 'The page will not appear on the website after this date and time. Leave blank for no end date.', date_linked: false
16
-
17
- = f.check_box :save_as_draft, label: "Save as a draft. It will not appear on the website and can only be accessed by admin users."
18
-
19
- - # acts_as_slugged
20
- - if f.object.persisted? || f.object.errors.include?(:slug)
21
- - current_url = effective_posts.post_path(f.object)
22
-
23
- = f.text_field :slug, required: f.object.persisted?,
24
- hint: "The slug controls this post's internet address. Be careful, changing the slug will break links that other websites may have to the old address.<br>#{('This post is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url && f.object.slug.present? }".html_safe
9
+ = acts_as_published_fields(f)
10
+ = acts_as_slugged_fields(f, url: (effective_posts.post_url(f.object) rescue nil))
25
11
 
26
12
  - if EffectivePosts.use_description
27
13
  = f.text_field :description, label: "Meta description", input_html: { maxlength: 150 },
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '2.7.1'.freeze
2
+ VERSION = '2.7.2'.freeze
3
3
  end
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.7.1
4
+ version: 2.7.2
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: 2024-07-29 00:00:00.000000000 Z
11
+ date: 2024-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails