= form_for(@post) do |f|

  - if @post.errors.any?
    #error_explanation
      h2
        => pluralize(@post.errors.count, 'errors')
        | prohibited this post from being saved:
      ul
        - @post.errors.full_messages.each do |error|
          li= error

  .field
    = f.label :title
    br/
    = f.text_field :title

  .field
    = f.label :content
    br/
    = f.text_area :content

  .field
    = f.collection_check_boxes :tag_ids, Tag.all, :id, :name
    = f.fields_for :tags, @post.tags.build do |tag_fields|
      = tag_fields.text_field :name

  .actions
    = f.submit

= form_for(@post) do |f|

  - if @post.errors.any?
    #error_explanation
      h2
        => pluralize(@post.errors.count, 'errors')
        | prohibited this post from being saved:
      ul
        - @post.errors.full_messages.each do |error|
          li= error

  .field
    = f.label :title
    br/
    = f.text_field :title

  .field
    = f.label :content
    br/
    = f.text_area :content

  .field
    = f.label "Tags"
    = f.collection_check_boxes :tag_ids, Tag.all, :id, :name
    br
    = f.fields_for :tags, @post.tags.build do |tag_fields|
      => tag_fields.label "New Tag"
      = tag_fields.text_field :name

  .actions
    = f.submit

Add labels to the post form for the tags
Add labels to the post form for the tags

theRingleman/rails_blog_project,theRingleman/rails_blog_project,theRingleman/rails_blog_project