What. The RedCloth gem is used to preview formatted text the user enters.
Anachronism. The only anachronism in this recipe concerns the change in how forms are typically built. In place of the form code in the text, something like the following is needed:
<% form_for @entry,
:url => {:action => "save"},
:html => { :id => "entry-form"} do |f| %>
<br/><%= f.text_field :title %><br />
<br/><%= f.text_area :body, :rows => 3 %><br />
<%= submit_tag "Save" %>
<% end %>
No comments:
Post a Comment