Skip to content
Newer
Older
100644 74 lines (49 sloc) 3.22 KB
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored May 1, 2011
1 == Welcome to Rails
b70062f @josevalim Rework a bit README files.
josevalim authored Jul 21, 2010
2
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored May 1, 2011
3 Rails is a web-application framework that includes everything needed to create
3e29f6a @bratish Added acronym and reference link for Model–view–controller
bratish authored Jun 8, 2011
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.
5
5b51e58 @htanata Fix two spaces between sententes on README.rdoc.
htanata authored Jul 27, 2011
6 Understanding the MVC pattern is key to understanding Rails. MVC divides your application
3e29f6a @bratish Added acronym and reference link for Model–view–controller
bratish authored Jun 8, 2011
7 into three layers, each with a specific responsibility.
8
9 The View layer is composed of "templates" that are responsible for providing
5b51e58 @htanata Fix two spaces between sententes on README.rdoc.
htanata authored Jul 27, 2011
10 appropriate representations of your application's resources. Templates
d3d2cea @vijaydev doc fixes
vijaydev authored Aug 28, 2011
11 can come in a variety of formats, but most view templates are \HTML with embedded Ruby
3e29f6a @bratish Added acronym and reference link for Model–view–controller
bratish authored Jun 8, 2011
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,
d3d2cea @vijaydev doc fixes
vijaydev authored Aug 27, 2011
16 database-backed model classes are derived from ActiveRecord::Base. Active Record allows
3e29f6a @bratish Added acronym and reference link for Model–view–controller
bratish authored Jun 8, 2011
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
20333be @tilsammans fix broken relative links [#5415 state:committed]
tilsammans authored Aug 24, 2010
21 {README}[link:files/activerecord/README_rdoc.html].
b70062f @josevalim Rework a bit README files.
josevalim authored Jul 21, 2010
22
7e65b00 @vijaydev Revert changes done in c56618e, 51cb745 and 030950a. The links are
vijaydev authored Jun 18, 2011
23 The Controller layer is responsible for handling incoming HTTP requests and providing a
d3d2cea @vijaydev doc fixes
vijaydev authored Aug 27, 2011
24 suitable response. Usually this means returning \HTML, but Rails controllers can also
7e65b00 @vijaydev Revert changes done in c56618e, 51cb745 and 030950a. The links are
vijaydev authored Jun 18, 2011
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 Jul 21, 2010
27
7e65b00 @vijaydev Revert changes done in c56618e, 51cb745 and 030950a. The links are
vijaydev authored Jun 18, 2011
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.
f21e8e0 @waynn Superfluous "the".
waynn authored Jul 29, 2011
30 This is unlike the relationship between Active Record and Action Pack which are
7e65b00 @vijaydev Revert changes done in c56618e, 51cb745 and 030950a. The links are
vijaydev authored Jun 18, 2011
31 independent. Each of these packages can be used independently outside of Rails. You
32 can read more about Action Pack in its {README}[link:files/actionpack/README_rdoc.html].
b70062f @josevalim Rework a bit README files.
josevalim authored Jul 21, 2010
33
34 == Getting Started
35
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored May 1, 2011
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 Jul 31, 2010
37
f7f5299 @fxn use the same amount of left indent in all code blocks of README.rdoc
fxn authored Jul 31, 2010
38 gem install rails
b70062f @josevalim Rework a bit README files.
josevalim authored Jul 21, 2010
39
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored May 1, 2011
40 2. At the command prompt, create a new Rails application:
b70062f @josevalim Rework a bit README files.
josevalim authored Jul 21, 2010
41
b451de0 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored Aug 14, 2010
42 rails new myapp
d3819da @fxn README.rdoc is your first impression, make sure it is clean
fxn authored Jul 31, 2010
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
50 Run with <tt>--help</tt> for options.
b70062f @josevalim Rework a bit README files.
josevalim authored Jul 21, 2010
51
e231c49 @bratish '/' was outside of anchor tag.
bratish authored Jul 30, 2011
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 Jul 31, 2010
53
f7f5299 @fxn use the same amount of left indent in all code blocks of README.rdoc
fxn authored Jul 31, 2010
54 "Welcome aboard: You're riding Ruby on Rails!"
b70062f @josevalim Rework a bit README files.
josevalim authored Jul 21, 2010
55
d3dce77 Edited README.rdoc via GitHub
Oge Nnadi authored Apr 11, 2011
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 Jul 21, 2010
57
d3819da @fxn README.rdoc is your first impression, make sure it is clean
fxn authored Jul 31, 2010
58 * The README file created within your application.
5e0b70e @fxn revises a few link texts
fxn authored Aug 26, 2010
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 Dec 25, 2010
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 Jul 21, 2010
63
64
65 == Contributing
66
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored May 1, 2011
67 We encourage you to contribute to Ruby on Rails! Please check out the {Contributing to Rails
7e65b00 @vijaydev Revert changes done in c56618e, 51cb745 and 030950a. The links are
vijaydev authored Jun 18, 2011
68 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 Jul 31, 2010
69 to proceed. {Join us}[http://contributors.rubyonrails.org]!
b70062f @josevalim Rework a bit README files.
josevalim authored Jul 21, 2010
70
71 == License
72
e68b7a0 @fxn (temporary hack) generate a main file for RDoc escaping "Rails"
fxn authored May 1, 2011
73 Ruby on Rails is released under the MIT license.
Something went wrong with that request. Please try again.