I’m having the same issue but am unable to move forward. Here is my code.
class TagsController < ApplicationController
def index
@tags = Tag.all
end
def show
@tag = Tag.find(params[:id])
@destinations = @tag.destinations
end
end
I’m having the same issue but am unable to move forward. Here is my code.
class TagsController < ApplicationController
def index
@tags = Tag.all
end
def show
@tag = Tag.find(params[:id])
@destinations = @tag.destinations
end
end
@shiggensdev Could you please post a link to the exercise you’re on and the code you have for show.html.erb
?
Here is the link.
and my code…
<div class="header">
<div class="container">
<img src="http://s3.amazonaws.com/codecademy-content/courses/learn-rails/img/logo-1tm.svg" width="80">
<h1>BokenjiKan</h1>
</div>
</div>
<div class="tags">
<div class="container">
<div class="cards row">
</div>
</div>
</div>
I’m on step three. If I comment out this line:
the error message goes away but then I obviously can’t complete the rest of the steps.
@shigginsdev No, you should leave that line alone, uncommented. Since you’re on step three, you need to be working in app/views/tags/show.html.erb
. The instructions say:
In app/views/tags/show.html.erb inside the
<h2>
element, display a tag’s title.
Then in
<div class="cards">...</div>
, iterate through each destination in the@destinations
array and display its image, name, and description.
Step one should be pretty easy, put <%= @tag.title %>
inside an <h2>
. Then, for step two, you’ll use a @destinations.each do |destination|
loop. Do you remember how to do that?
Sorry, it’s step 2 where I get the error. Here is my code.
class TagsController < ApplicationController
def index
@tags = Tag.all
end
def show
@tag = Tag.find(params[:id])
@destinations = @tag.destinations
end
end
@shigginsdev Aside from an extra blank line in mine (which doesn’t affect anything), your code is identical to mine, so I’m not sure why it’s not working for you
You are adding that code in app/controllers/tags_controller.rb
, right?
Correct. I’ve tried this several times on several different days. Always the same error.
@shigginsdev I’m really sorry, but I don’t know what’s wrong
Please let me know if you figure it out!
Do you know how to contact Codecadmy support directly? I’ve filled out the “Report a Bug” form twice with no response. I was considering upgrading to a Premium account but now…
@shigginsdev Codecademy sees their email & messages, but they’re not very good at responding to them, just because they get so many.
I would file this as a bug directly into our bug tracker, but I haven’t seen anyone else with the same problem, which makes me feel that there’s got to be a problem somewhere else in your code, I just don’t know where
If you create a Pro account, it’s super easy to cancel in the first two weeks (Settings → Cancel Pro), and you could share your code with me easily by clicking the triangle-ish shaped button by the “Run” button and sharing the URL with me.
(I don’t mean to sound like I’m trying to make a sale, but I do think if you could share your entire code with me it’d be great)
This topic is inactive.