Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Not allowing me to delete

I am following along from this video

https://teamtreehouse.com/library/build-a-simple-ruby-on-rails-application/frontend-development/updating-the-index-page

What it is doing is just giving the status and ID like link. Like so

http://gyazo.com/c1dc763751aa3a8ba62c3f42b7810747

that is what happens when I click on it. As well as I don't get any conformation to delete it.

inde.html.erb

`<div class="page-header">

<h1> All Statuses </h1> </div>

<% @statuses.each do |status| %>

<div class="status">

  <strong> <%= status.name %> </strong>
  <p> <%=status.content %> </p>

  <div class="meta">

    | <%= link_to time_ago_in_words(status.created_at) + " ago", status %> |

    <span class="admin">

      <%= link_to "Edit", edit_status_path(status) %> |
      <%= link_to "Delete", status, method: :delete, data: { confirm: "Are you sure you would like to remove this post?" } %>

    </span>

  </div>

</div>

<% end %>

application.html.erb

`<!DOCTYPE html>

<html> <head> <title>Treebook</title> <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "applicaition" %> <%= csrf_meta_tags %> </head> <body>

<div class="navbar navbar-inverse navbar-fixed-top">

<div class="navbar-inner">

<div class="container">

  <a href="#" class="brand"> Treebook </a>

  <ul class="nav">

    <li> <%= link_to "All Statuses", statuses_path %>  </li>

  </ul>

</div>

</div>

</div>

<div class="container">

<%= yield %>

</div>

</body> </html>

Can show the code to the controller and the routes please :)

I am very dearly sorry I had forgotten to mention I had finished this, it was the application.html.erb, I am sorry.

https://teamtreehouse.com/forum/why-is-the-jquery-hover-class-not-working

2 Answers

Jejeje no problem :) happy learning

Could you help me with my jQuery problem though?

im not good for jquery but i can try give the link to where you post :P

Thank you so much Sir, it's pretty simple. Not sure why it won't work though.

https://teamtreehouse.com/forum/why-is-the-jquery-hover-class-not-working