This commit is contained in:
f 2018-12-28 14:23:38 -03:00
parent 6dd7b2a85f
commit 56ad911dc1
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
2 changed files with 3 additions and 3 deletions

View file

@ -179,7 +179,7 @@ class Post
end
def check_box_group?
array? && contents.fetch('checkbox', false)
array? && (complex? && contents.fetch('checkbox', false))
end
def array?

View file

@ -17,7 +17,7 @@
- else
- url = site_post_path(@site, @post, lang: @lang)
- method = :patch
- if pre = @post.template.get_front_matter('pre')
- if pre = @post.template.try(:get_front_matter, 'pre')
= render 'layouts/help', help: CommonMarker.render_doc(pre).to_html
= form_tag url,
method: method,
@ -136,5 +136,5 @@
= submit_tag t('posts.save_incomplete'), class: 'btn btn-info submit-post-incomplete', name: 'commit_incomplete'
.invalid_help.alert.alert-danger.d-none= @site.config.dig('invalid_help') || t('posts.invalid_help')
.sending_help.alert.alert-success.d-none= @site.config.dig('sending_help') || t('posts.sending_help')
- if post = @post.template.get_front_matter('post')
- if post = @post.template.try(:get_front_matter, 'post')
= render 'layouts/help', help: CommonMarker.render_doc(post).to_html