<commit_before>extends ../../layouts/admin

append breadcrumbs
  li: a(href='/admin/posts') Posts Administration
  li.active= title

block body
  if (errors && errors.length)
    .alert.alert-danger.alert-dismissable
      button.close(type='button', data-dismiss='alert' aria-hidden='true')
        | &times;
      ul
      each error in errors
        li= error

  form(action='/admin/posts/#{result.post.id}', method='post', role='form')
    include _form

    input(type='hidden', name='user_id', value=result.post.user_id)
    input(type='hidden', name='_csrf', value=token)
    input(type='hidden', name='_method', value='put')

    button.btn.btn-primary(type='submit')
      i.fa.fa-plus
      |  Edit Post
    | 
    a.btn.btn-default(href='/admin/posts', role='button') Cancel<commit_msg>Fixed issue where user id was not being saved in Post edits.<commit_after>extends ../../layouts/admin

append breadcrumbs
  li: a(href='/admin/posts') Posts Administration
  li.active= title

block body
  if (errors && errors.length)
    .alert.alert-danger.alert-dismissable
      button.close(type='button', data-dismiss='alert' aria-hidden='true')
        | &times;
      ul
      each error in errors
        li= error

  form(action='/admin/posts/#{result.post.id}', method='post', role='form')
    include _form

    input(type='hidden', name='user_id', value=result.user.id)
    input(type='hidden', name='_csrf', value=token)
    input(type='hidden', name='_method', value='put')

    button.btn.btn-primary(type='submit')
      i.fa.fa-plus
      |  Edit Post
    | 
    a.btn.btn-default(href='/admin/posts', role='button') Cancel
{'fraction_non_alphanumeric': 0.16422466422466422, 'fraction_numerical': 0.0, 'mean_word_length': 3.3706666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4920289', 'n_tokens_mistral': 543, 'n_tokens_neox': 528, 'n_words': 106}