- Given that I am at http://localhost:3000/posts/new
- When the server is running
- Then I get the error "NoMethodError in Posts#new"
I worked on it the next day. I checked the code. Suddenly it was working. It may have been a white spave issue.
undefined method errors for nil:NilClass
Tutorial | Codebase | Stylesheets
$ git remote add origin [email protected]:jendiamond/flixnpix.git
https://www.airpair.com/ruby-on-rails/posts/building-a-restful-api-in-a-rails-application
http://gunnarpeipman.com/2015/05/why-to-avoid-fat-controllers/
Move the code to Web API
If your views make requests to controller just to get and save JSON-based data
Then you should introduce API controller for this kind of requests
- Download the zipfile
- Open and extract the .tar file use iZip
- Open pgAdmin3 in the terminal
$ pgadmin3 - Double click on PGSQL9.5 to see the database drop down
- Right click on Databases and select "New Database"
- Name the database and select done