Exercise 3 Rails getting started part 1 of the exercise


#1

have a problem with the beginning of the exercise.
https://www.codecademy.com/en/courses/learn-rails/lessons/one-model/exercises/one-model-controller?action=lesson_resume

I have no problem making the controller but when it comes to the routing I cant seem the get the desired answer for making the route and I've tried various ways and have googled it so thats why Im here.

here is the code I have for the db.route file which is where the problem is.

Rails.application.routes.draw do
  get 'messages', to 'index#messages'
  
  
end

not sure if its right but if anyone can help that would be great!

anything related to my posting and how I can improve if I've done anything irelevant is much appreciated also!


#2

Hi Tommy Maher,

'index#messages'

You have the order there mixed up. It needs to be controller#action, so like this instead:

'messages#index'

#3

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