Monday, July 17, 2017

Chapter 11 in My Own Style myapp2

* In Brackets, I switched the project folder to myapp2.

* Then I started the Ruby on Rails server.
$ cd myapp2
$ rails s -b 0.0.0.0 -p 3000

* In Firefox, I typed: http://localhost:3000/

* For chapter 11, most of the coding are just the same no matter how is the CSS stylesheet and the metadata with one single name field in opposite to two first name and last name fields. I am going to do project myapp2 in "Fast Forward Mode". The instructions from the  book can be found on : https://www.railstutorial.org/book/account_activation And the source code on my project myapp2 can be found on: https://github.com/jimmy2046/myapp2.


*  I made minor change to the :before_action in User Controller.
That was a user must log in in order to use the "show" action to view other user's profiles.
myapp2/app/controller/users_controller.rb
  before_action :logged_in_user, only: [:index, :show, :edit, :update, :destroy]

No comments:

Post a Comment

How to kill an abandoned process in Linux/Unix

I remembered it, then I forgot, then I remembered it, and then I forgot again. In case of a Linux/Unit process hang, I have to figure out ...