effective_posts 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d8ad99d213f6946178f6ee95f35d5e457cfb2adce548ae2e33d513087e72c34
4
- data.tar.gz: c2be01f6e4b03b42a45203f90c5f796e61dc25587bb9fe98647e27a64c0b2031
3
+ metadata.gz: cdd29ad9c84d93fdaeb2b0ae091f0af2a49c5189cd1ee5eeac47c6a4c3b7c0a9
4
+ data.tar.gz: 3f03cba92f98e9f3b1e7c9226343d738229eb329261afc3704b6c832204f2b0b
5
5
  SHA512:
6
- metadata.gz: 4bbe96be0a51878183fa877150b83067da2ffad8bdbb7830807f80a7176e0deb91e35587f1ca24cd6a551b141d449acc13f7a68186ab57b0bd5811d4e67de8ba
7
- data.tar.gz: 58cff47c9439c69cd2105465a37bd9c26951f31374fcb84c19ffe89ef9f3fc3d47d2db53e6bd91afe8cad20abce9f568e73290f242789687847fe64d61a2a458
6
+ metadata.gz: 47436cd866a630f0555a87bd7cd1ac64f335d40cb10a08b623b769cdb08e39fea366c46bbefe684a4f286fea727573032b6a069d20149cf9ee3a7f9813bfede9
7
+ data.tar.gz: 2020f6718c4ea5c3feb5244a4476876caea782f906811e6d590aabaf23b9f13cf5a688e678c4eb7fe9901df91c6ba42136df678787ad06748dfbf3314cf0f3d8
@@ -1,5 +1,6 @@
1
1
  = effective_form_with(model: post, url: post.persisted? ? effective_posts.admin_post_path(post.id) : effective_posts.admin_posts_path) do |f|
2
2
  = f.text_field :title, hint: 'The title of your post.'
3
+
3
4
  - if f.object.persisted? || f.object.errors.include?(:slug)
4
5
  - current_url = (effective_posts.post_url(f.object) rescue nil)
5
6
  = f.text_field :slug, 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 }".html_safe
@@ -1,6 +1,10 @@
1
1
  = effective_form_with(model: post, url: post.persisted? ? effective_posts.post_path(post.id) : effective_posts.posts_path) do |f|
2
2
  = f.text_field :title, hint: 'The title of your post.'
3
3
 
4
+ - if f.object.persisted? || f.object.errors.include?(:slug)
5
+ - current_url = (effective_posts.post_url(f.object) rescue nil)
6
+ = f.text_field :slug, 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 }".html_safe
7
+
4
8
  - if Array(EffectivePosts.categories).length > 1
5
9
  = f.select :category, EffectivePosts.categories
6
10
  - else
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '1.1.3'.freeze
2
+ VERSION = '1.1.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect