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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdd29ad9c84d93fdaeb2b0ae091f0af2a49c5189cd1ee5eeac47c6a4c3b7c0a9
|
4
|
+
data.tar.gz: 3f03cba92f98e9f3b1e7c9226343d738229eb329261afc3704b6c832204f2b0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|