I am doing
def index
@tags = Tag.all
end
but it didn’t work
can anybody tell me what is the problem
thanks
Hi @frentea,
Please post your full code, a link to the exercise you’re on, and the error message you’re getting so we can help you.
@frentea Your code in tags_controller.rb
looks fine to me - what if you put a space on either side of the equal sign (=
), like this:
@tags = Tag.all
?
I tried this, didn’t work either.
I also tried:
@tags = Tags.all
@tags = tags.all
@tags = tag.all
all failed.
I think maybe something in front steps was wrong, but codecademy passed me here to this step, which seems I got all right answers before. Therefore I really don’t know where I am missing or wrong.
@frentea The code I posted is correct, so probably something did go wrong earlier. Could I see your code in config/routes.rb
?
Also, what does it say in the error message you get?
the code is like this in routes.rb:
and there is no message getting when this error occurs, just like the 3rd picture I send you in the last reply.
plus, I tried: get ‘tags’ => ‘Tags#index’
also failed.
failed again…I’ve reported a bug.
Got the same problem. Have reported a bug as well!
Yeah, maybe it’s a systematic problem. I reported a bug, you can do that too.
Yep…
I reported bug for two times, but nothing happened.
Is there any other problem you think might be possible?
Just restart the exercise. I had the same problem, when i restarted it had solved.
Same issue. Also reported a bug. Let’s hope they fix it soon. Restarting didn’t help for me, sadly.
I tried “I want to restart this exercise” and it worked for me.
@frentea My bad, I meant get 'tags' => 'tags#index'
(with quotes around tags
). But due to the number of other people saying this exercise is bugged, I’m guessing it probably is, and that this isn’t a problem with your code
I tried “I want to restart this exercise” in “get help” and it worked. So people have similar problem could try this. Thank you very much for help! @zystvan