NameDateSize

..16-Mar-201612 KiB

.gitignore10-Sep-2015493

.travis.yml09-Nov-20151.2 KiB

.yardopts29-Dec-201268

actionmailer/09-Dec-20154 KiB

actionpack/14-Dec-20154 KiB

actionview/09-Dec-20154 KiB

activejob/09-Dec-20154 KiB

activemodel/09-Dec-20154 KiB

activerecord/15-Dec-20154 KiB

activesupport/14-Dec-20154 KiB

ci/30-Nov-20154 KiB

CODE_OF_CONDUCT.md24-Aug-2015304

CONTRIBUTING.md15-Dec-20152.8 KiB

Gemfile14-Dec-20154.1 KiB

Gemfile.lock11-Dec-20158.7 KiB

guides/20-Aug-20154 KiB

load_paths.rb29-Dec-201251

rails.gemspec02-Sep-20151.2 KiB

RAILS_VERSION03-Dec-201412

railties/14-Dec-20154 KiB

Rakefile09-Nov-20151.9 KiB

README.md30-Nov-20154.3 KiB

RELEASING_RAILS.md17-Aug-20156.5 KiB

tasks/16-Nov-20154 KiB

tools/17-Jun-20154 KiB

version.rb03-Dec-2014308

README.md

1## Welcome to Rails
2
3Rails is a web-application framework that includes everything needed to
4create database-backed web applications according to the
5[Model-View-Controller (MVC)](http://en.wikipedia.org/wiki/Model-view-controller)
6pattern.
7
8Understanding the MVC pattern is key to understanding Rails. MVC divides your
9application into three layers, each with a specific responsibility.
10
11The _Model layer_ represents your domain model (such as Account, Product,
12Person, Post, etc.) and encapsulates the business logic that is specific to
13your application. In Rails, database-backed model classes are derived from
14`ActiveRecord::Base`. Active Record allows you to present the data from
15database rows as objects and embellish these data objects with business logic
16methods. You can read more about Active Record in its [README](activerecord/README.rdoc).
17Although most Rails models are backed by a database, models can also be ordinary
18Ruby classes, or Ruby classes that implement a set of interfaces as provided by
19the Active Model module. You can read more about Active Model in its [README](activemodel/README.rdoc).
20
21The _Controller layer_ is responsible for handling incoming HTTP requests and
22providing a suitable response. Usually this means returning HTML, but Rails controllers
23can also generate XML, JSON, PDFs, mobile-specific views, and more. Controllers load and
24manipulate models, and render view templates in order to generate the appropriate HTTP response.
25In Rails, incoming requests are routed by Action Dispatch to an appropriate controller, and
26controller classes are derived from `ActionController::Base`. Action Dispatch and Action Controller
27are bundled together in Action Pack. You can read more about Action Pack in its
28[README](actionpack/README.rdoc).
29
30The _View layer_ is composed of "templates" that are responsible for providing
31appropriate representations of your application's resources. Templates can
32come in a variety of formats, but most view templates are HTML with embedded
33Ruby code (ERB files). Views are typically rendered to generate a controller response,
34or to generate the body of an email. In Rails, View generation is handled by Action View.
35You can read more about Action View in its [README](actionview/README.rdoc).
36
37Active Record, Active Model, Action Pack, and Action View can each be used independently outside Rails.
38In addition to them, Rails also comes with Action Mailer ([README](actionmailer/README.rdoc)), a library
39to generate and send emails; Active Job ([README](activejob/README.md)), a
40framework for declaring jobs and making them run on a variety of queueing
41backends; and Active Support ([README](activesupport/README.rdoc)), a collection
42of utility classes and standard library extensions that are useful for Rails,
43and may also be used independently outside Rails.
44
45## Getting Started
46
471. Install Rails at the command prompt if you haven't yet:
48
49        $ gem install rails
50
512. At the command prompt, create a new Rails application:
52
53        $ rails new myapp
54
55   where "myapp" is the application name.
56
573. Change directory to `myapp` and start the web server:
58
59        $ cd myapp
60        $ rails server
61
62   Run with `--help` or `-h` for options.
63
644. Using a browser, go to `http://localhost:3000` and you'll see:
65"Welcome aboard: You're riding Ruby on Rails!"
66
675. Follow the guidelines to start developing your application. You may find
68   the following resources handy:
69    * [Getting Started with Rails](http://guides.rubyonrails.org/getting_started.html)
70    * [Ruby on Rails Guides](http://guides.rubyonrails.org)
71    * [The API Documentation](http://api.rubyonrails.org)
72    * [Ruby on Rails Tutorial](http://www.railstutorial.org/book)
73
74## Contributing
75
76We encourage you to contribute to Ruby on Rails! Please check out the
77[Contributing to Ruby on Rails guide](http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html) for guidelines about how to proceed. [Join us!](http://contributors.rubyonrails.org)
78
79Everyone interacting in Rails and its sub-projects' codebases, issue trackers, chat rooms, and mailing lists is expected to follow the Rails [code of conduct](http://rubyonrails.org/conduct/).
80
81## Code Status
82
83[![Build Status](https://travis-ci.org/rails/rails.svg?branch=master)](https://travis-ci.org/rails/rails)
84
85## License
86
87Ruby on Rails is released under the [MIT License](http://www.opensource.org/licenses/MIT).
88