Changeset 3
Author: edmundjohnson
(2010/03/16 07:02) About 2 years ago
Reordered, and note about freelender.org added at start.
Author: edmundjohnson
(2010/03/16 07:02) About 2 years ago
Reordered, and note about freelender.org added at start.
== Description of contentsappHolds all the code that's specific to this particular application.app/controllersHolds controllers that should be named like weblogs_controller.rb forautomated URL mapping. All controllers should descend from ApplicationControllerwhich itself descends from ActionController::Base.app/modelsHolds models that should be named like post.rb.Most models will descend from ActiveRecord::Base.app/viewsHolds the template files for the view that should be named likeweblogs/index.rhtml for the WeblogsController#index action. All views use eRubysyntax.app/views/layoutsHolds the template files for layouts to be used with views. This models the commonheader/footer method of wrapping views. In your views, define a layout using the<tt>layout :default</tt> and create a file named default.rhtml. Inside default.rhtml,call <% yield %> to render the view using this layout.app/helpersHolds view helpers that should be named like weblogs_helper.rb. These are generatedfor you automatically when using script/generate for controllers. Helpers can be used towrap functionality for your views into methods.configConfiguration files for the Rails environment, the routing map, the database, and other dependencies.componentsSelf-contained mini-applications that can bundle together controllers, models, and views.dbContains the database schema in schema.rb. db/migrate contains allthe sequence of Migrations for your schema.docThis directory is where your application documentation will be stored when generatedusing <tt>rake doc:app</tt>libApplication specific libraries. Basically, any kind of custom code that doesn'tbelong under controllers, models, or helpers. This directory is in the load path.publicThe directory available for the web server. Contains subdirectories for images, stylesheets,and javascripts. Also contains the dispatchers and the default HTML files. This should beset as the DOCUMENT_ROOT of your web server.scriptHelper scripts for automation and generation.testUnit and functional tests along with fixtures. When using the script/generate scripts, templatetest files will be generated for you and placed in this directory.vendorExternal libraries that the application depends on. Also includes the plugins subdirectory.This directory is in the load path.