Cannot Go Forward on Display All Tags


#1

I'm on Display all Tags and have the following in routes.rb:

Rails.application.routes.draw do
get 'welcome' => 'pages#home'
get '/tags' => 'tags#index'
def index
@tags = Tag.all
end
end

I cannot go forward. Is it the "welcome" that is the problem? I have
copied the rest from Forum answers.

@robinlrandall https://discuss.codecademy.com/users/robinlrandall


Associations 1 "bundle install Gemsfile" works but wont continue
#2

Hey @robinlrandall,

This part:

def index
  @tags = Tag.all
end

is in the wrong file. Those three lines belong in app/controllers/tags_controller.rb :slight_smile:


#3

It says "limit framework"


#4

@robinlrandall Your code looks fine to me. What happens if you temporarily remove the whole def index ... end part, do you get past step 2 then?

Or, does changing /tags to tags in config/routes.rb change anything?


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.