Sha256: 2cd1be7427ce62c8c31642c28ef39873076e2057547c70ca4537ba0066205ebe

Contents?: true

Size: 1.08 KB

Versions: 10

Compression:

Stored size: 1.08 KB

Contents

<%= form_for(post, html: {class: "new_blog_post", id: "new_blog_post"}) do |f| %>

  <% if post.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(post.errors.count, "error") %> prohibited this post from being saved:</h2>

      <ul>
        <% post.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <fieldset>
    <%= field do %>
      <%= f.text_field :title, placeholder: "Give your post a title" %>
    <% end %>

    <%= field do %>
      <%= f.text_area :body, placeholder: "Write something here..." %>
    <% end %>
  </fieldset>

  <fieldset>

    <%= field id: "new_blog_post_tag_field" do %>
      <%= f.label :tag_list, "Tags" %>
      <%= f.text_field :tag_list, placeholder: "tag one, tag two, etc..." %>
    <% end %>
    
    <p class="blog_post_tip">
      Tip: you can style your post using <%= blogit_conf.default_parser %>
    </p>

  </fieldset>

  <%= actions do %>
    <%= f.submit %> or 
    <%= link_to("cancel", post.new_record? ? root_path : post_path(post)) %>
  <% end %>

<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
blogit-0.0.13 app/views/blogit/posts/_form.html.erb
blogit-0.0.12 app/views/blogit/posts/_form.html.erb
blogit-0.0.11 app/views/blogit/posts/_form.html.erb
blogit-0.0.10 app/views/blogit/posts/_form.html.erb
blogit-0.0.9 app/views/blogit/posts/_form.html.erb
blogit-0.0.8 app/views/blogit/posts/_form.html.erb
blogit-0.0.7 app/views/blogit/posts/_form.html.erb
blogit-0.0.6 app/views/blogit/posts/_form.html.erb
blogit-0.0.5 app/views/blogit/posts/_form.html.erb
blogit-0.0.4 app/views/blogit/posts/_form.html.erb