User can access to the blog by either as registered user or as a guest.
A guest can:
- View the article list of the blog
- View the text (details) of each article
- Add a comment
- Add a new article
- Edit an article
- Destroy (delete) an article
- Destroy a comment
git clone https://github.com/jimmy2046/gettingstarttedwithrailsSample outputs:
Cloning into 'gettingstarttedwithrails'...It will download all the files and directory structure into your computer named gettingstarttedwithrails.
remote: Counting objects: 121, done.
remote: Compressing objects: 100% (100/100), done.
remote: Total 121 (delta 6), reused 121 (delta 6), pack-reused 0
Receiving objects: 100% (121/121), 25.45 KiB | 0 bytes/s, done.
Resolving deltas: 100% (6/6), done.
Checking connectivity... done.
/home/yourname/gettingstarttedwithrailsOr
~/gettingstarttedwithrails
Change into the directory gettingstarttedwithrails:
cd gettingstarttedwithrailsStart the Rails server:
rails serverIn Firefox, type: http://localhost:3000/ Then, it will show up Pending Migration Error. In the other words: database migration is need.
Open a new shell terminal windows and type database migration command in Linux prompt:
cd gettingstarttedwithrailsNow reload the http://localhost:3000/ link in Firefox. It will bring you to the Hello Rails index page.
rails db:migrate RAILS_ENV=development
Click the My Blog link and it will bring you to blog listing page. You can add a new article by clicking the New article link. That will initiate a controller to add a new article. You will need a user name and password for adding a post.
- User Name: "dhh"
- Password: "secret"
This is the first magic of Ruby on Rails.
Really Good blog post.provided a helpful information.I hope that you will post more updates like this Ruby on Rails Online Training
ReplyDeleteBangalore