Build a Blog App using Rails
The Blog Application, usage specification
- Blog is a contraction of "weblog", a discussion or information site published on the Web
- There are two types of users: the Blog Administrator and Blog User.
- The blog Administrator should be able to enter new postings, typically in reverse chronological order.
- Users should be able to visit the blog site, and enter comments about particular postings.
- The blog Administrator should be able to modify/remove any posting or comments.
- Users should not be able to modify posting or other users' comments.
Initial Steps
- First create the rails application using:
$ rails new blog
- Next, in the blog app directory, use the scaffold generator to create the MVC components needed for posts and comments
$ rails generate scaffold post title:string body:text
$ rails generate scaffold comment post_id:integer body:text
- Then, create the post and comment database tables using:
rake db:migrate
- To start the web server:
$ rails server
and point your browser to: http://localhost:3000
To get a list of all URLs currently recognized by your application:
$ rake routes
The CRUD operations on database
- Create
- Read
- Update
- Destroy
References & Resources
- N/A
Latest Post
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Combine JavaScript and CSS
- Inline Small JavaScript and CSS
- Minify JavaScript and CSS
- Defer Parsing of JavaScript
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Percentile
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync