Changeset 3

User picture

Author: edmundjohnson

(2010/03/16 07:02) About 2 years ago

Reordered, and note about freelender.org added at start.

Affected files

Updated freelender/readme Download diff

23
1
Note that this is a generic Ruby on Rails readme file and is not specific to freelender.org.
2
However, freelender.org does follow Ruby on rails standards, so what follows below is broadly applicable.
3
4
5
== Description of contents of code directories
6
7
app
8
  Holds all the code that's specific to this particular application.
9
10
app/controllers
11
  Holds controllers that should be named like weblogs_controller.rb for
12
  automated URL mapping. All controllers should descend from ApplicationController
13
  which itself descends from ActionController::Base.
14
15
app/models
16
  Holds models that should be named like post.rb.
17
  Most models will descend from ActiveRecord::Base.
18
19
app/views
20
  Holds the template files for the view that should be named like
21
  weblogs/index.rhtml for the WeblogsController#index action. All views use eRuby
22
  syntax.
23
24
app/views/layouts
25
  Holds the template files for layouts to be used with views. This models the common
26
  header/footer method of wrapping views. In your views, define a layout using the
27
  <tt>layout :default</tt> and create a file named default.rhtml. Inside default.rhtml,
28
  call <% yield %> to render the view using this layout.
29
30
app/helpers
31
  Holds view helpers that should be named like weblogs_helper.rb. These are generated
32
  for you automatically when using script/generate for controllers. Helpers can be used to
33
  wrap functionality for your views into methods.
34
35
config
36
  Configuration files for the Rails environment, the routing map, the database, and other dependencies.
37
38
components
39
  Self-contained mini-applications that can bundle together controllers, models, and views.
40
41
db
42
  Contains the database schema in schema.rb.  db/migrate contains all
43
  the sequence of Migrations for your schema.
44
45
doc
46
  This directory is where your application documentation will be stored when generated
47
  using <tt>rake doc:app</tt>
48
49
lib
50
  Application specific libraries. Basically, any kind of custom code that doesn't
51
  belong under controllers, models, or helpers. This directory is in the load path.
52
53
public
54
  The directory available for the web server. Contains subdirectories for images, stylesheets,
55
  and javascripts. Also contains the dispatchers and the default HTML files. This should be
56
  set as the DOCUMENT_ROOT of your web server.
57
58
script
59
  Helper scripts for automation and generation.
60
61
test
62
  Unit and functional tests along with fixtures. When using the script/generate scripts, template
63
  test files will be generated for you and placed in this directory.
64
65
vendor
66
  External libraries that the application depends on. Also includes the plugins subdirectory.
67
  This directory is in the load path.
68
1
== Welcome to Rails
69
== Welcome to Rails
2
70
3
Rails is a web-application and persistence framework that includes everything
71
Rails is a web-application and persistence framework that includes everything
...
...
114
To reload your controllers and models after launching the console run <tt>reload!</tt>
182
To reload your controllers and models after launching the console run <tt>reload!</tt>
115
183
116
To reload your controllers and models after launching the console run <tt>reload!</tt>
184
To reload your controllers and models after launching the console run <tt>reload!</tt>
117
118
119
120
== Description of contents
121
122
app
123
  Holds all the code that's specific to this particular application.
124
125
app/controllers
126
  Holds controllers that should be named like weblogs_controller.rb for
127
  automated URL mapping. All controllers should descend from ApplicationController
128
  which itself descends from ActionController::Base.
129
130
app/models
131
  Holds models that should be named like post.rb.
132
  Most models will descend from ActiveRecord::Base.
133
134
app/views
135
  Holds the template files for the view that should be named like
136
  weblogs/index.rhtml for the WeblogsController#index action. All views use eRuby
137
  syntax.
138
139
app/views/layouts
140
  Holds the template files for layouts to be used with views. This models the common
141
  header/footer method of wrapping views. In your views, define a layout using the
142
  <tt>layout :default</tt> and create a file named default.rhtml. Inside default.rhtml,
143
  call <% yield %> to render the view using this layout.
144
145
app/helpers
146
  Holds view helpers that should be named like weblogs_helper.rb. These are generated
147
  for you automatically when using script/generate for controllers. Helpers can be used to
148
  wrap functionality for your views into methods.
149
150
config
151
  Configuration files for the Rails environment, the routing map, the database, and other dependencies.
152
153
components
154
  Self-contained mini-applications that can bundle together controllers, models, and views.
155
156
db
157
  Contains the database schema in schema.rb.  db/migrate contains all
158
  the sequence of Migrations for your schema.
159
160
doc
161
  This directory is where your application documentation will be stored when generated
162
  using <tt>rake doc:app</tt>
163
164
lib
165
  Application specific libraries. Basically, any kind of custom code that doesn't
166
  belong under controllers, models, or helpers. This directory is in the load path.
167
168
public
169
  The directory available for the web server. Contains subdirectories for images, stylesheets,
170
  and javascripts. Also contains the dispatchers and the default HTML files. This should be
171
  set as the DOCUMENT_ROOT of your web server.
172
173
script
174
  Helper scripts for automation and generation.
175
176
test
177
  Unit and functional tests along with fixtures. When using the script/generate scripts, template
178
  test files will be generated for you and placed in this directory.
179
180
vendor
181
  External libraries that the application depends on. Also includes the plugins subdirectory.
182
  This directory is in the load path.