I generated a scaffold so that i can post blog entries into my site.
I already made one for articles which works the way i wanted…
However i generated another one for reviews but when i post my reviews only a couple of sentences show and not the whole review. When i go back to edit the review most of my review is gone and only a couple of sentences shows up…..
I can’t seem to add more than a couple of sentences for some reason…..
It has nothing to do with the CSS since i turned all styles off and i still get the same results
Heres the Show Page
<div class="container">
<div class="row">
<div class="span4">
<%= image_tag @comic_review.photo %>
</div>
<div class="span8 comic_review_content">
<h3>
<b><%= @comic_review.title %></b>
</h3>
<br />
<p>
<b>Synopsis:</b>
<%= @comic_review.content %>
</p>
<p>
<b>Credits:</b>
<%= @comic_review.credits %>
</p>
<h3>Review</h3>
<div class="line_section"></div>
<p><%= simple_format @comic_review.review %></p>
<%= link_to 'Edit', edit_comic_review_path(@comic_review) %> |
<%= link_to 'Back', comic_reviews_path %>
<div class="comment_count">
All Comments (<%= @comic_review.comments.count %>)
</div>
<%= render "comments/comments" %>
<%= render "comments/form" %>
</div>
Heres the actual form
<%= form_for @comic_review, :html => { :multipart => true } do |f| %>
<% if @comic_review.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@comic_review.errors.count, "error") %> prohibited this article from being saved:</h2>
<ul>
<% @comic_review.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<b>Title</b>
<br />
<%= f.text_field :title, class: 'form_field1' %>
</div>
<br />
<div class="field">
<b>Author</b>
<br />
<%= f.text_field :credits, class: 'form_field1' %>
</div>
<br />
<div class="field">
<b>Date</b>
<br />
<%= f.text_field :content, class: 'form_field1' %>
</div>
<br />
<%= f.file_field :photo, class: "photo_upload" %>
<br />
<br />
<div class="field">
<b>Content</b>
<br />
<%= f.text_field :review, rows: 25, class: 'form_field' %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
I dont know whats going on any help would be appreciated thank you in advance
In your database, is the type of the
reviewcolumnVARCHAR(255)? If so, that would be because you didreview:stringwhen you generated the scaffold;stringgets converted toVARCHAR(255), and at least with MySQL, if you insert a string with more than 255 characters into a column of that type, it truncates everything after the first 255 characters.The fix is to change the column type. Log in to the mysql console unser your database, and run: