Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 2908

Show
Ignore:
Timestamp:
11/07/05 09:51:47 (3 years ago)
Author:
david
Message:

Fix READMEs (closes #2680) [coffee2code]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/README

    r2649 r2908  
    2525Record. Action Pack is an independent package that can be used with any sort 
    2626of backend (Instiki[http://www.instiki.org], which is based on an older version 
    27 of Action Pack, uses Madeleine for example). Read more about the role Action 
     27of Action Pack, used Madeleine for example). Read more about the role Action 
    2828Pack can play when used together with Active Record on 
    2929http://www.rubyonrails.org. 
     
    3232 
    3333* Actions grouped in controller as methods instead of separate command objects 
    34   and can therefore helper share methods. 
     34  and can therefore share helper methods. 
    3535 
    3636    BlogController < ActionController::Base 
     
    104104        # Before this action is run, the user will be authenticated, the cache 
    105105        # will be examined to see if a valid copy of the results already 
    106         # exist, and the action will be logged for auditing. 
     106        # exists, and the action will be logged for auditing. 
    107107         
    108108        # After this action has run, the output will first be localized then  
    109         # compressed to minimize bandwith usage 
     109        # compressed to minimize bandwidth usage 
    110110      end 
    111111       
    112112      private 
    113113        def authenticate 
    114           # Implement the filter will full access to both request and response 
     114          # Implement the filter with full access to both request and response 
    115115        end 
    116116    end 
     
    317317    <%= form "post" %> 
    318318     
    319     ...will generate something like (the selects will have more options of 
     319    ...will generate something like (the selects will have more options, of 
    320320    course): 
    321321     
     
    414414This simple setup will list all the posts in the system on the index page, 
    415415which is called by accessing /weblog/. It uses the form builder for the Active 
    416 Record model to make the new screen, which in turns hand everything over to 
     416Record model to make the new screen, which in turn hands everything over to 
    417417the create action (that's the default target for the form builder when given a 
    418418new model). After creating the post, it'll redirect to the display page using 
  • trunk/activerecord/README

    r2825 r2908  
    22 
    33Active Record connects business objects and database tables to create a persistable 
    4 domain model where logic and data is presented in one wrapping. It's an implementation  
     4domain model where logic and data are presented in one wrapping. It's an implementation  
    55of the object-relational mapping (ORM) pattern[http://www.martinfowler.com/eaaCatalog/activeRecord.html]  
    66by the same name as described by Martin Fowler: 
     
    99       the database access, and adds domain logic on that data." 
    1010 
    11 Active Records main contribution to the pattern is to relieve the original of two stunting problems: 
     11Active Record's main contribution to the pattern is to relieve the original of two stunting problems: 
    1212lack of associations and inheritance. By adding a simple domain language-like set of macros to describe 
    1313the former and integrating the Single Table Inheritance pattern for the latter, Active Record narrows the 
     
    158158     pkId = 1234 
    159159     cat = Cat.find(pkId) 
    160      # something even more interesting involving a the same cat... 
     160     # something even more interesting involving the same cat... 
    161161     cat.save 
    162162 
     
    190190Data definitions are specified only in the database. Active Record queries the database for  
    191191the column names (that then serves to determine which attributes are valid) on regular 
    192 objects instantiation through the new constructor and relies on the column names in the rows 
     192object instantiation through the new constructor and relies on the column names in the rows 
    193193with the finders. 
    194194  
     
    236236== Simple example (2/2): Using the domain 
    237237 
    238 Picking a database connection for all the active records 
     238Picking a database connection for all the Active Records 
    239239 
    240240   ActiveRecord::Base.establish_connection( 
     
    301301== Philosophy  
    302302 
    303 Active Record attempts to provide a coherent wrapping for the inconvenience that is  
     303Active Record attempts to provide a coherent wrapper as a solution for the inconvenience that is  
    304304object-relational mapping. The prime directive for this mapping has been to minimize 
    305 the amount of code needed to built a real-world domain model. This is made possible 
     305the amount of code needed to build a real-world domain model. This is made possible 
    306306by relying on a number of conventions that make it easy for Active Record to infer 
    307307complex relations and structures from a minimal amount of explicit direction. 
  • trunk/activesupport/README

    r784 r2908  
    1919== Installation 
    2020 
    21 The prefered method of installing Active Support is through its GEM file. You'll need to have 
    22 RubyGems[http://rubygems.rubyforge.org/wiki/wiki.pl] installed for that, though. If you have
     21The preferred method of installing Active Support is through its GEM file. You'll need to have 
     22RubyGems[http://rubygems.rubyforge.org/wiki/wiki.pl] installed for that, though. If you have it
    2323then use: 
    2424 
  • trunk/railties/README

    r2796 r2908  
    11== Welcome to Rails 
    22 
    3 Rails is a web-application and persistance framework that includes everything 
     3Rails is a web-application and persistence framework that includes everything 
    44needed to create database-backed web-applications according to the 
    55Model-View-Control pattern of separation. This pattern splits the view (also 
    66called the presentation) into "dumb" templates that are primarily responsible 
    7 for inserting pre-build data in between HTML tags. The model contains the 
     7for inserting pre-built data in between HTML tags. The model contains the 
    88"smart" domain objects (such as Account, Product, Person, Post) that holds all 
    99the business logic and knows how to persist themselves to a database. The 
     
    1111Product, Show Post) by manipulating the model and directing data to the view. 
    1212 
    13 In Rails, the model is handled by what's called a object-relational mapping 
     13In Rails, the model is handled by what's called an object-relational mapping 
    1414layer entitled Active Record. This layer allows you to present the data from 
    1515database rows as objects and embellish these data objects with business logic 
     
    1717link:files/vendor/rails/activerecord/README.html. 
    1818 
    19 The controller and view is handled by the Action Pack, which handles both 
     19The controller and view are handled by the Action Pack, which handles both 
    2020layers by its two parts: Action View and Action Controller. These two layers 
    2121are bundled in a single package due to their heavy interdependence. This is 
     
    5050 
    5151NOTE: Be sure that CGIs can be executed in that directory as well. So ExecCGI 
    52 should be on and ".cgi" should respond. All requests from 127.0.0.1 goes 
     52should be on and ".cgi" should respond. All requests from 127.0.0.1 go 
    5353through CGI, so no Apache restart is necessary for changes. All other requests 
    54 goes through FCGI (or mod_ruby) that requires restart to show changes. 
     54go through FCGI (or mod_ruby), which requires a restart to show changes. 
    5555 
    5656 
     
    102102Here you'll have all parts of the application configured, just like it is when the 
    103103application is running. You can inspect domain models, change values, and save to the 
    104 database. Start the script without arguments will launch it in the development environment. 
     104database. Starting the script without arguments will launch it in the development environment. 
    105105Passing an argument will specify a different environment, like <tt>console production</tt>. 
    106106 
     
    118118app/models 
    119119  Holds models that should be named like post.rb. 
    120   Most models will descent from ActiveRecord::Base. 
     120  Most models will descend from ActiveRecord::Base. 
    121121   
    122122app/views 
    123123  Holds the template files for the view that should be named like 
    124   weblog/index.rhtml for the WeblogController#index action. All views uses eRuby 
     124  weblog/index.rhtml for the WeblogController#index action. All views use eRuby 
    125125  syntax. This directory can also be used to keep stylesheets, images, and so on 
    126126  that can be symlinked to public. 
     
    133133 
    134134components 
    135   Self-contained mini-applications that can bundle controllers, models, and views together
     135  Self-contained mini-applications that can bundle together controllers, models, and views
    136136 
    137137lib 
    138138  Application specific libraries. Basically, any kind of custom code that doesn't 
    139   belong controllers, models, or helpers. This directory is in the load path. 
     139  belong under controllers, models, or helpers. This directory is in the load path. 
    140140     
    141141public 
    142   The directory available for the web server. Contains sub-directories for images, stylesheets, 
     142  The directory available for the web server. Contains subdirectories for images, stylesheets, 
    143143  and javascripts. Also contains the dispatchers and the default HTML files. 
    144144 
     
    150150 
    151151vendor 
    152   External libraries that the application depend on. This directory is in the load path. 
     152  External libraries that the application depends on. Also includes the plugins subdirectory. 
     153  This directory is in the load path.