Convention Over Configuration

suggest change

In Rails, you find yourself looking at controllers, views, and models for your database.

To reduce the need for heavy configuration, Rails implements rules to ease up working with the application. You may define your own rules but for the beginning (and for later on) it’s a good idea to stick to conventions that Rails offers.

These conventions will speed up development, keep your code concise and readable, and allow you an easy navigation inside your application.

Conventions also lower the barriers to entry for beginners. There are so many conventions in Rails that a beginner doesn’t even need to know about, but can just benefit from in ignorance. It’s possible to create great applications without knowing why everything is the way it is.

For Example

If the database table is orders with primary key id, the model class is Order (in order.rb) and the controller is OrdersController (in orders_controller.rb). Views follow the actions: a new action has a new template, and an edit action has an edit template.

For Example

To create an app you simply run rails new app_name. This will generate roughly 70 files and folders that comprise the infrastructure and foundation for your Rails app.

It includes:

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents