json - uninitialized constant Api in Rails app -
IVE created a controller named People Controller:
To guide some guide pointers of this guide Trying:
/ P>
module API module V1 category public controller & lt; ApplicationController Def Salutation: json = & gt; {Message: "Hello World!"} In this controller there is a simple Hello method, which is called Hello world when it is called Jason My Way:
Rail Application Routes. Draw Namespace: API, Default: {format: 'json'} Place name: get v1 "/ Hello" = & gt; "People #happy", like: & gt; 'Hello' and end So if I call this URL then I should get Jason response: /api/v1/greet.json But instead I get the unrefined continuous API I am doing, and about 4 hours of struggle, I can not really know what I did wrong.
What is this that I have done wrong?
Eager_load in your config / environment / development.rb config = True
Comments
Post a Comment