Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 79 lines (52 sloc) 3.614 kB
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored
1 == Welcome to Rails
b70062f @josevalim Rework a bit README files.
josevalim authored
2
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored
3 Rails is a web-application framework that includes everything needed to create
266b1bd @bratish Added acronym and reference link for Model–view–controller
bratish authored
4 database-backed web applications according to the {Model-View-Controller (MVC)}[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller] pattern.
3540579 @JeffCohen Update the MVC explanation in the main README.rdoc file
JeffCohen authored
5
a45c2d5 @htanata Fix two spaces between sententes on README.rdoc.
htanata authored
6 Understanding the MVC pattern is key to understanding Rails. MVC divides your application
3540579 @JeffCohen Update the MVC explanation in the main README.rdoc file
JeffCohen authored
7 into three layers, each with a specific responsibility.
8
9 The View layer is composed of "templates" that are responsible for providing
a45c2d5 @htanata Fix two spaces between sententes on README.rdoc.
htanata authored
10 appropriate representations of your application's resources. Templates
8526f72 @vijaydev doc fixes
vijaydev authored
11 can come in a variety of formats, but most view templates are \HTML with embedded Ruby
3540579 @JeffCohen Update the MVC explanation in the main README.rdoc file
JeffCohen authored
12 code (.erb files).
13
14 The Model layer represents your domain model (such as Account, Product, Person, Post)
15 and encapsulates the business logic that is specific to your application. In Rails,
8526f72 @vijaydev doc fixes
vijaydev authored
16 database-backed model classes are derived from ActiveRecord::Base. Active Record allows
3540579 @JeffCohen Update the MVC explanation in the main README.rdoc file
JeffCohen authored
17 you to present the data from database rows as objects and embellish these data objects
18 with business logic methods. Although most Rails models are backed by a database, models
19 can also be ordinary Ruby classes, or Ruby classes that implement a set of interfaces as
20 provided by the ActiveModel module. You can read more about Active Record in its
c3bd6bb @vijaydev Fixes readme links better - earlier links broke when the current page…
vijaydev authored
21 {README}[link:/rails/rails/blob/master/activerecord/README.rdoc].
b70062f @josevalim Rework a bit README files.
josevalim authored
22
727a5a7 @JeffCohen Replace old wording about http requests
JeffCohen authored
23 The Controller layer is responsible for handling incoming HTTP requests and providing a
8526f72 @vijaydev doc fixes
vijaydev authored
24 suitable response. Usually this means returning \HTML, but Rails controllers can also
727a5a7 @JeffCohen Replace old wording about http requests
JeffCohen authored
25 generate XML, JSON, PDFs, mobile-specific views, and more. Controllers manipulate models
26 and render view templates in order to generate the appropriate HTTP response.
b70062f @josevalim Rework a bit README files.
josevalim authored
27
3540579 @JeffCohen Update the MVC explanation in the main README.rdoc file
JeffCohen authored
28 In Rails, the Controller and View layers are handled together by Action Pack.
29 These two layers are bundled in a single package due to their heavy interdependence.
b15cc2e @waynn Superfluous "the".
waynn authored
30 This is unlike the relationship between Active Record and Action Pack which are
3540579 @JeffCohen Update the MVC explanation in the main README.rdoc file
JeffCohen authored
31 independent. Each of these packages can be used independently outside of Rails. You
c3bd6bb @vijaydev Fixes readme links better - earlier links broke when the current page…
vijaydev authored
32 can read more about Action Pack in its {README}[link:/rails/rails/blob/master/actionpack/README.rdoc].
b70062f @josevalim Rework a bit README files.
josevalim authored
33
34 == Getting Started
35
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored
36 1. Install Rails at the command prompt if you haven't yet:
d3819da @fxn README.rdoc is your first impression, make sure it is clean
fxn authored
37
f7f5299 @fxn use the same amount of left indent in all code blocks of README.rdoc
fxn authored
38 gem install rails
b70062f @josevalim Rework a bit README files.
josevalim authored
39
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored
40 2. At the command prompt, create a new Rails application:
b70062f @josevalim Rework a bit README files.
josevalim authored
41
b451de0 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
42 rails new myapp
d3819da @fxn README.rdoc is your first impression, make sure it is clean
fxn authored
43
44 where "myapp" is the application name.
45
46 3. Change directory to +myapp+ and start the web server:
47
48 cd myapp; rails server
49
426840c @sandeepr-sourcebits -h also shows help options.
sandeepr-sourcebits authored
50 Run with <tt>--help</tt> or <tt>-h</tt> for options.
b70062f @josevalim Rework a bit README files.
josevalim authored
51
2350185 @bratish '/' was outside of anchor tag.
bratish authored
52 4. Go to http://localhost:3000 and you'll see:
d3819da @fxn README.rdoc is your first impression, make sure it is clean
fxn authored
53
f7f5299 @fxn use the same amount of left indent in all code blocks of README.rdoc
fxn authored
54 "Welcome aboard: You're riding Ruby on Rails!"
b70062f @josevalim Rework a bit README files.
josevalim authored
55
d3dce77 Edited README.rdoc via GitHub
Oge Nnadi authored
56 5. Follow the guidelines to start developing your application. You may find the following resources handy:
b70062f @josevalim Rework a bit README files.
josevalim authored
57
d3819da @fxn README.rdoc is your first impression, make sure it is clean
fxn authored
58 * The README file created within your application.
5e0b70e @fxn revises a few link texts
fxn authored
59 * The {Getting Started with Rails}[http://guides.rubyonrails.org/getting_started.html].
60 * The {Ruby on Rails Tutorial}[http://railstutorial.org/book].
5cefa00 @vijaydev removed dup link to 'getting started'
vijaydev authored
61 * The {Ruby on Rails Guides}[http://guides.rubyonrails.org].
62 * The {API Documentation}[http://api.rubyonrails.org].
b70062f @josevalim Rework a bit README files.
josevalim authored
63
82de8ad @vijaydev Use Travis https build status image in order to prevent GitHub from
vijaydev authored
64 == Contributing
b70062f @josevalim Rework a bit README files.
josevalim authored
65
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored
66 We encourage you to contribute to Ruby on Rails! Please check out the {Contributing to Rails
c76c4f6 @judearasu rails request has been moved from Lighthouse to Github, contribution …
judearasu authored
67 guide}[http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html] for guidelines about how
d3819da @fxn README.rdoc is your first impression, make sure it is clean
fxn authored
68 to proceed. {Join us}[http://contributors.rubyonrails.org]!
b70062f @josevalim Rework a bit README files.
josevalim authored
69
255c485 @laserlemon Add dependency status (a la build status) to the README
laserlemon authored
70 == Build Status {<img src="https://secure.travis-ci.org/rails/rails.png"/>}[http://travis-ci.org/rails/rails]
71
72 == Dependency Status {<img src="https://gemnasium.com/rails/rails.png?travis"/>}[https://gemnasium.com/rails/rails]
82de8ad @vijaydev Use Travis https build status image in order to prevent GitHub from
vijaydev authored
73
b70062f @josevalim Rework a bit README files.
josevalim authored
74 == License
75
2315e96 @imkmf Finished implementation of MIT license linking.
imkmf authored
76 Ruby on Rails is released under the MIT license:
77
200d760 @yesmeck Sorry for editing this file.
yesmeck authored
78 * http://www.opensource.org/licenses/MIT
Something went wrong with that request. Please try again.