I am trying to render a partial on a page in rails. For some reason the code is not being rendered into html. I have tried taking it out of the partial and just placing it in the profile page but still nothing. I am getting no errors and have restarted the server but still nothing. This is in development mode. Also all code except the message code works fine. Any help would be appreciated. Here is the code.
profile.html.erb
<% unless @pictures.nil? %>
<div id="container" style="width: 500px; height: 450px;">
<div id="slides">
<% @pictures.each do |picture| %>
<%= image_tag(picture.image.url(:thumbnail)) %>
<% end %>
<a href="#" class="slidesjs-previous slidesjs-navigation"><%= image_tag("left.png") %></a>
<a href="#" class="slidesjs-next slidesjs-navigation"><%= image_tag("right.jpeg") %></a>
</div>
</div>
<% end %>
<% render 'message' %>
_message.html.erb
<% form_for @message, :url => messages_create_path do |f| %>
<% f.hidden_field :from, value: current_user.id %>
<% f.hidden_field :to, value: @user.id %>
<% f.text_area :message %><br />
<% f.submit "Send Message" %>
<% end %>
To make your
form_for
code block to render you need to use<%=
tag as follows: