Display all tags, step 3


#1

I am doing
def index
@tags = Tag.all
end
but it didn't work
can anybody tell me what is the problem
thanks


#2

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.


#4

Thanks for help!
Now I am posting some pictures of my problem.




#5

@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

?


#6

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.


#7

@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?


#8

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.


#9

plus, I tried: get 'tags' => 'Tags#index'
also failed.


#10

@frentea Try lowercasing Tags#index


#11

failed again...I've reported a bug.


#12

Got the same problem. Have reported a bug as well!


#13

Yeah, maybe it's a systematic problem. I reported a bug, you can do that too.


#14

@frentea So get tags => 'tags#index' (that exact code) didn't work?


#15

Yep..

I reported bug for two times, but nothing happened.

Is there any other problem you think might be possible?


#16

Just restart the exercise. I had the same problem, when i restarted it had solved.


#17

Same issue. Also reported a bug. Let's hope they fix it soon. Restarting didn't help for me, sadly.


#18

I tried "I want to restart this exercise" and it worked for me.


#19

Can any one help me solving this error message.
def index
@tags = tag.all
end


#20

@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 :confused:


#21

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