Last active
October 24, 2016 04:38
-
-
Save karuna24s/b9baf09f54cf36d11ff245fe24f45d5b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class=" well col-sm-6"> | |
<%= render 'shared/error_messages' %> | |
<h3>Food Travel Story</h3> | |
<p>Title: <%[email protected]%></p> | |
<p>Written by: <%= @destination.user.name %></p> | |
<p>Location: <%[email protected]%></p> | |
<p>Name: <%[email protected]%></p> | |
<p>Type of Food: <%[email protected]%></p> | |
<p>Content: <%[email protected]%></p> | |
<p>Recommendations: <%[email protected]%></p><br> | |
<%= link_to "Update Food Travel Story", edit_destination_path(@destination), class: "btn btn-info btn-sm dest_button" %><br><br> | |
<%= link_to "Delete Food Travel Story", [@destination], method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-warning btn-sm dest_button" %><br><br> | |
<% if current_user %> | |
<h4>Add a comment:</h4> | |
<%= form_for @comment, url: destination_comments_path(@destination, @comment) do |f| %> | |
<p><strong>Content</strong> <%= f.text_area :content, class: 'form-control' %></p> | |
<%= f.submit "Create Comment", class: "btn btn-sm btn-primary" %> | |
<% end %><br> | |
<% else %> | |
<p>Please log in order to add a comment.</p> | |
<% end %> | |
<h4>Comments:</h4> | |
<% @destination.comments.each do |comment| %> | |
<div class="well well-white"> | |
<strong><%= comment.user.name %></strong> says: <%= comment.content %> | |
</div> | |
<% end %> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment