Ruby on Rails Friday, March 8, 2019

On Fri, 8 Mar 2019 at 12:19, Robert Phillips
<robert.phillips37@gmail.com> wrote:
>
>
>
> On Friday, 8 March 2019 12:07:16 UTC, Colin Law wrote:
>>
>>
>> You can reference any controller/action in the routes. Welcome#index
>> is no different to any other. Reference it exactly the same way as
>> you would reference any controller#action.
>
>
> Would be all lowercase. (as with all controllers , they have an uppercase letter in some parts of rails, but in the config/routes.rb file they are all lowercase)
>
> I have tried get '/abc', to:'welcome#index'
>
> or
> root 'welcome#index'
>
>
> And doesn't work.
>
> I get uninitialized constant WelcomeController

Have you got a controller called WelcomeController? If not then what
is the name of the controller with method index?

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv4JqvtXmHCDOuLCWo23DOP0o68CPDuB6eaLzkX-kk6eg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment