= simple_form_for @article do |f|
  
  = f.input :title
  = link_to "Markdown Cheat Sheet", image_path("markdown-cheat-sheet.png"), target: "_blank", class: "markdown-cheat"
  = f.input :content
  = f.input :tag_tokens, label: "Tags", input_html: { data: {load: @tags} }
  - if current_user.try(:id) == 1
    = f.input :author_id, as: :select, collection: User.all, include_blank: "Select Author"
    = f.input :editor_id, as: :select, collection: User.all, include_blank: "Select Editor"
    = f.input :created_at, as: :string
    = f.input :updated_at, as: :string
  - else
    - if @article.author.blank?
      = f.input :author_id, as: :hidden, input_html: { value: current_user.try(:id) }
    = f.input :editor_id, as: :hidden, input_html: { value: current_user.try(:id) }
  = f.button :submit, class: "btn-a"
= simple_form_for @article do |f|
  
  = f.input :title
  = link_to "Markdown Cheat Sheet", image_path("markdown-cheat-sheet.png"), target: "_blank", class: "markdown-cheat"
  = f.input :content
  = f.input :tag_tokens, label: "Tags", input_html: { data: {load: @tags} }
  - if current_user.try(:id) == 1 || Rails.env.development?
    = f.input :author_id, as: :select, collection: User.all, include_blank: "Select Author"
    = f.input :editor_id, as: :select, collection: User.all, include_blank: "Select Editor"
    = f.input :created_at, as: :string
    = f.input :updated_at, as: :string
  - else
    - if @article.author.blank?
      = f.input :author_id, as: :hidden, input_html: { value: current_user.try(:id) }
    = f.input :editor_id, as: :hidden, input_html: { value: current_user.try(:id) }
  = f.button :submit, class: "btn-a"
Allow admin debugging in dev.
Allow admin debugging in dev.
