From 72df64b4e1229ddf05d75d17a0bc0eb1ad453910 Mon Sep 17 00:00:00 2001 From: gnagno Date: Sat, 23 Jul 2011 08:26:18 -0700 Subject: now the documentation reflects the actual returned value for a missing translation --- actionpack/lib/action_view/helpers/translation_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb index 26b6e8b599..be64dc823e 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionpack/lib/action_view/helpers/translation_helper.rb @@ -25,7 +25,7 @@ module ActionView # * a titleized version of the last key segment as a text. # # E.g. the value returned for a missing translation key :"blog.post.title" will be - # Title. + # Title. # This way your views will display rather reasonable strings but it will still # be easy to spot missing translations. # -- cgit v1.2.3 From 50d5e0f7e8ab01f3e7b5cf806eb4f9348eeff363 Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Sat, 23 Jul 2011 11:28:49 -0400 Subject: Tests now require MySQL2 adapter in order to run --- .../guides/source/contributing_to_ruby_on_rails.textile | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile index e6ec061c9a..ddb82fef65 100644 --- a/railties/guides/source/contributing_to_ruby_on_rails.textile +++ b/railties/guides/source/contributing_to_ruby_on_rails.textile @@ -81,10 +81,10 @@ $ gem install bundler and run: -$ bundle install --without db +$ bundle install -This command will install all dependencies except the MySQL and PostgreSQL Ruby drivers. We will come back at these soon. With dependencies installed, you can run the test suite with: +This command will install all dependencies. With dependencies installed, you can run the test suite with: $ rake test @@ -139,15 +139,6 @@ $ sudo apt-get install mysql-server libmysqlclient15-dev $ sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev -After that run: - - -$ rm .bundle/config -$ bundle install - - -We need first to delete +.bundle/config+ because Bundler remembers in that file that we didn't want to install the "db" group (alternatively you can edit the file). - In order to be able to run the test suite against MySQL you need to create a user named +rails+ with privileges on the test databases: -- cgit v1.2.3 From 662a71b09f025016db223991017df9a179f42ff4 Mon Sep 17 00:00:00 2001 From: Evan Farrar Date: Sat, 23 Jul 2011 12:23:44 -0400 Subject: =?UTF-8?q?Replaced=20=E2=80=98=20with=20'=20in=20the=20guides.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- railties/guides/source/action_view_overview.textile | 4 ++-- railties/guides/source/security.textile | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/railties/guides/source/action_view_overview.textile b/railties/guides/source/action_view_overview.textile index 7703d6c720..d40e0840ce 100644 --- a/railties/guides/source/action_view_overview.textile +++ b/railties/guides/source/action_view_overview.textile @@ -870,7 +870,7 @@ h4. FormHelper Form helpers are designed to make working with models much easier compared to using just standard HTML elements by providing a set of methods for creating forms based on your models. This helper generates the HTML for forms, providing a method for each sort of input (e.g., text, password, select, and so on). When the form is submitted (i.e., when the user hits the submit button or form.submit is called via JavaScript), the form inputs will be bundled into the params object and passed back to the controller. -There are two types of form helpers: those that specifically work with model attributes and those that don't. This helper deals with those that work with model attributes; to see an example of form helpers that don‘t work with model attributes, check the ActionView::Helpers::FormTagHelper documentation. +There are two types of form helpers: those that specifically work with model attributes and those that don't. This helper deals with those that work with model attributes; to see an example of form helpers that don't work with model attributes, check the ActionView::Helpers::FormTagHelper documentation. The core method of this helper, form_for, gives you the ability to create a form for a model instance; for example, let's say that you have a model Person and want to create a new instance of it: @@ -914,7 +914,7 @@ check_box("post", "validated") h5. fields_for -Creates a scope around a specific model object like form_for, but doesn‘t create the form tags themselves. This makes fields_for suitable for specifying additional model objects in the same form: +Creates a scope around a specific model object like form_for, but doesn't create the form tags themselves. This makes fields_for suitable for specifying additional model objects in the same form: <%= form_for @person, :url => { :action => "update" } do |person_form| %> diff --git a/railties/guides/source/security.textile b/railties/guides/source/security.textile index 908f3f125a..1f6ff88c1f 100644 --- a/railties/guides/source/security.textile +++ b/railties/guides/source/security.textile @@ -15,7 +15,7 @@ endprologue. h3. Introduction -Web application frameworks are made to help developers building web applications. Some of them also help you with securing the web application. In fact one framework is not more secure than another: If you use it correctly, you will be able to build secure apps with many frameworks. Ruby on Rails has some clever helper methods, for example against SQL injection, so that this is hardly a problem. It‘s nice to see that all of the Rails applications I audited had a good level of security. +Web application frameworks are made to help developers building web applications. Some of them also help you with securing the web application. In fact one framework is not more secure than another: If you use it correctly, you will be able to build secure apps with many frameworks. Ruby on Rails has some clever helper methods, for example against SQL injection, so that this is hardly a problem. It's nice to see that all of the Rails applications I audited had a good level of security. In general there is no such thing as plug-n-play security. Security depends on the people using the framework, and sometimes on the development method. And it depends on all layers of a web application environment: The back-end storage, the web server and the web application itself (and possibly other layers or applications). @@ -23,7 +23,7 @@ The Gartner Group however estimates that 75% of attacks are at the web applicati The threats against web applications include user account hijacking, bypass of access control, reading or modifying sensitive data, or presenting fraudulent content. Or an attacker might be able to install a Trojan horse program or unsolicited e-mail sending software, aim at financial enrichment or cause brand name damage by modifying company resources. In order to prevent attacks, minimize their impact and remove points of attack, first of all, you have to fully understand the attack methods in order to find the correct countermeasures. That is what this guide aims at. -In order to develop secure web applications you have to keep up to date on all layers and know your enemies. To keep up to date subscribe to security mailing lists, read security blogs and make updating and security checks a habit (check the Additional Resources chapter). I do it manually because that‘s how you find the nasty logical security problems. +In order to develop secure web applications you have to keep up to date on all layers and know your enemies. To keep up to date subscribe to security mailing lists, read security blogs and make updating and security checks a habit (check the Additional Resources chapter). I do it manually because that's how you find the nasty logical security problems. h3. Sessions @@ -209,7 +209,7 @@ The HTTP protocol basically provides two main types of requests - GET and POST ( * The interaction _(highlight)changes the state_ of the resource in a way that the user would perceive (e.g., a subscription to a service), or * The user is _(highlight)held accountable for the results_ of the interaction. -If your web application is RESTful, you might be used to additional HTTP verbs, such as PUT or DELETE. Most of today‘s web browsers, however do not support them - only GET and POST. Rails uses a hidden +_method+ field to handle this barrier. +If your web application is RESTful, you might be used to additional HTTP verbs, such as PUT or DELETE. Most of today's web browsers, however do not support them - only GET and POST. Rails uses a hidden +_method+ field to handle this barrier. _(highlight)POST requests can be sent automatically, too_. Here is an example for a link which displays www.harmless.com as destination in the browser's status bar. In fact it dynamically creates a new form that sends a POST request. @@ -617,7 +617,7 @@ This is alright for some web applications, but certainly not if the user is not Depending on your web application, there will be many more parameters the user can tamper with. As a rule of thumb, _(highlight)no user input data is secure, until proven otherwise, and every parameter from the user is potentially manipulated_. -Don‘t be fooled by security by obfuscation and JavaScript security. The Web Developer Toolbar for Mozilla Firefox lets you review and change every form's hidden fields. _(highlight)JavaScript can be used to validate user input data, but certainly not to prevent attackers from sending malicious requests with unexpected values_. The Live Http Headers plugin for Mozilla Firefox logs every request and may repeat and change them. That is an easy way to bypass any JavaScript validations. And there are even client-side proxies that allow you to intercept any request and response from and to the Internet. +Don't be fooled by security by obfuscation and JavaScript security. The Web Developer Toolbar for Mozilla Firefox lets you review and change every form's hidden fields. _(highlight)JavaScript can be used to validate user input data, but certainly not to prevent attackers from sending malicious requests with unexpected values_. The Live Http Headers plugin for Mozilla Firefox logs every request and may repeat and change them. That is an easy way to bypass any JavaScript validations. And there are even client-side proxies that allow you to intercept any request and response from and to the Internet. h3. Injection @@ -825,7 +825,7 @@ Network traffic is mostly based on the limited Western alphabet, so new characte &#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41;> -This example pops up a message box. It will be recognized by the above sanitize() filter, though. A great tool to obfuscate and encode strings, and thus “get to know your enemy”, is the "Hackvertor":http://www.businessinfo.co.uk/labs/hackvertor/hackvertor.php. Rails‘ sanitize() method does a good job to fend off encoding attacks. +This example pops up a message box. It will be recognized by the above sanitize() filter, though. A great tool to obfuscate and encode strings, and thus “get to know your enemy”, is the "Hackvertor":http://www.businessinfo.co.uk/labs/hackvertor/hackvertor.php. Rails' sanitize() method does a good job to fend off encoding attacks. h5. Examples from the Underground -- cgit v1.2.3 From 66b4d112363f3786ecfe4b28d2b00bdcde7e706f Mon Sep 17 00:00:00 2001 From: Evan Farrar Date: Sat, 23 Jul 2011 13:57:56 -0400 Subject: Changed several instances of British English to be American English --- railties/guides/source/action_mailer_basics.textile | 2 +- railties/guides/source/active_record_validations_callbacks.textile | 6 +++--- railties/guides/source/active_support_core_extensions.textile | 2 +- railties/guides/source/asset_pipeline.textile | 2 +- railties/guides/source/association_basics.textile | 2 +- railties/guides/source/configuring.textile | 2 +- railties/guides/source/initialization.textile | 2 +- railties/guides/source/layouts_and_rendering.textile | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/railties/guides/source/action_mailer_basics.textile b/railties/guides/source/action_mailer_basics.textile index 2eaee158ff..f05d9dcf1c 100644 --- a/railties/guides/source/action_mailer_basics.textile +++ b/railties/guides/source/action_mailer_basics.textile @@ -422,7 +422,7 @@ The above will send a multipart email with an attachment, properly nested with t h3. Receiving Emails -Receiving and parsing emails with Action Mailer can be a rather complex endeavour. Before your email reaches your Rails app, you would have had to configure your system to somehow forward emails to your app, which needs to be listening for that. So, to receive emails in your Rails app you'll need to: +Receiving and parsing emails with Action Mailer can be a rather complex endeavor. Before your email reaches your Rails app, you would have had to configure your system to somehow forward emails to your app, which needs to be listening for that. So, to receive emails in your Rails app you'll need to: * Implement a +receive+ method in your mailer. diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile index 50ff1c9ff7..ce0b5416de 100644 --- a/railties/guides/source/active_record_validations_callbacks.textile +++ b/railties/guides/source/active_record_validations_callbacks.textile @@ -848,7 +848,7 @@ The way form fields with errors are treated is defined by +ActionView::Base.fiel * A string with the HTML tag * An instance of +ActionView::Helpers::InstanceTag+. -Here is a simple example where we change the Rails behaviour to always display the error messages in front of each of the form fields with errors. The error messages will be enclosed by a +span+ element with a +validation-error+ CSS class. There will be no +div+ element enclosing the +input+ element, so we get rid of that red border around the text field. You can use the +validation-error+ CSS class to style it anyway you want. +Here is a simple example where we change the Rails behavior to always display the error messages in front of each of the form fields with errors. The error messages will be enclosed by a +span+ element with a +validation-error+ CSS class. There will be no +div+ element enclosing the +input+ element, so we get rid of that red border around the text field. You can use the +validation-error+ CSS class to style it anyway you want. ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| @@ -941,7 +941,7 @@ The +after_initialize+ callback will be called whenever an Active Record object The +after_find+ callback will be called whenever Active Record loads a record from the database. +after_find+ is called before +after_initialize+ if both are defined. -The +after_initialize+ and +after_find+ callbacks are a bit different from the others. They have no +before_*+ counterparts, and the only way to register them is by defining them as regular methods. If you try to register +after_initialize+ or +after_find+ using macro-style class methods, they will just be ignored. This behaviour is due to performance reasons, since +after_initialize+ and +after_find+ will both be called for each record found in the database, significantly slowing down the queries. +The +after_initialize+ and +after_find+ callbacks are a bit different from the others. They have no +before_*+ counterparts, and the only way to register them is by defining them as regular methods. If you try to register +after_initialize+ or +after_find+ using macro-style class methods, they will just be ignored. This behavior is due to performance reasons, since +after_initialize+ and +after_find+ will both be called for each record found in the database, significantly slowing down the queries. class User < ActiveRecord::Base @@ -1172,7 +1172,7 @@ As usual, settings in +config/environments+ take precedence over those in +confi h4. Sharing Observers -By default, Rails will simply strip "Observer" from an observer's name to find the model it should observe. However, observers can also be used to add behaviour to more than one model, and so it's possible to manually specify the models that our observer should observe. +By default, Rails will simply strip "Observer" from an observer's name to find the model it should observe. However, observers can also be used to add behavior to more than one model, and so it's possible to manually specify the models that our observer should observe. class MailerObserver < ActiveRecord::Observer diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index b35e04d7e1..781d3d08cd 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -500,7 +500,7 @@ ActionController::TestCase.class_eval do end -Rails uses +alias_method_chain+ all over the code base. For example validations are added to +ActiveRecord::Base#save+ by wrapping the method that way in a separate module specialised in validations. +Rails uses +alias_method_chain+ all over the code base. For example validations are added to +ActiveRecord::Base#save+ by wrapping the method that way in a separate module specialized in validations. NOTE: Defined in +active_support/core_ext/module/aliasing.rb+. diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index 5999c78369..51cb332e38 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -397,7 +397,7 @@ config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' You should check that your server or hosting service actually supports this, otherwise comment it out. -WARNING: If you are upgrading an existing application and intend to use this option, take care to paste this configuration option only into +production.rb+ (and not +application.rb+) and any other environment you define with production behaviour. +WARNING: If you are upgrading an existing application and intend to use this option, take care to paste this configuration option only into +production.rb+ (and not +application.rb+) and any other environment you define with production behavior. h3. How Caching Works diff --git a/railties/guides/source/association_basics.textile b/railties/guides/source/association_basics.textile index 3c2497e83a..ce4ff0389d 100644 --- a/railties/guides/source/association_basics.textile +++ b/railties/guides/source/association_basics.textile @@ -443,7 +443,7 @@ class CreateAssemblyPartJoinTable < ActiveRecord::Migration end -We pass +:id => false+ to +create_table+ because that table does not represent a model. That's required for the association to work properly. If you observe any strange behaviour in a +has_and_belongs_to_many+ association like mangled models IDs, or exceptions about conflicting IDs chances are you forgot that bit. +We pass +:id => false+ to +create_table+ because that table does not represent a model. That's required for the association to work properly. If you observe any strange behavior in a +has_and_belongs_to_many+ association like mangled models IDs, or exceptions about conflicting IDs chances are you forgot that bit. h4. Controlling Association Scope diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile index 7ed958be08..2ff5de2334 100644 --- a/railties/guides/source/configuring.textile +++ b/railties/guides/source/configuring.textile @@ -523,7 +523,7 @@ The error occurred while evaluating nil.each *+action_view.cache_asset_ids+* Sets +ActionView::Helpers::AssetTagHelper::AssetPaths.cache_asset_ids+ to +false+ when Active Support loads, but only if +config.cache_classes+ is too. -*+action_view.javascript_expansions+* Registers the expansions set up by +config.action_view.javascript_expansions+ and +config.action_view.stylesheet_expansions+ to be recognised by Action View and therefore usable in the views. +*+action_view.javascript_expansions+* Registers the expansions set up by +config.action_view.javascript_expansions+ and +config.action_view.stylesheet_expansions+ to be recognized by Action View and therefore usable in the views. *+action_view.set_configs+* Sets up Action View by using the settings in +config.action_view+ by +send+'ing the method names as setters to +ActionView::Base+ and passing the values through. diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile index 340699419b..477ee5a3a2 100644 --- a/railties/guides/source/initialization.textile +++ b/railties/guides/source/initialization.textile @@ -512,7 +512,7 @@ h4. +railties/lib/rails/ruby_version_check.rb+ This file simply checks if the Ruby version is less than 1.8.7 or is 1.9.1 and raises an error if that is the case. Rails 3 simply will not run on earlier versions of Ruby than 1.8.7 or 1.9.1. -NOTE: You should always endeavour to run the latest version of Ruby with your Rails applications. The benefits are many, including security fixes and the like, and very often there is a speed increase associated with it. The caveat is that you could have code that potentially breaks on the latest version, which should be fixed to work on the latest version rather than kept around as an excuse not to upgrade. +NOTE: You should always endeavor to run the latest version of Ruby with your Rails applications. The benefits are many, including security fixes and the like, and very often there is a speed increase associated with it. The caveat is that you could have code that potentially breaks on the latest version, which should be fixed to work on the latest version rather than kept around as an excuse not to upgrade. h4. +active_support/core_ext/kernel/reporting.rb+ diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile index ba45b84242..57485e8986 100644 --- a/railties/guides/source/layouts_and_rendering.textile +++ b/railties/guides/source/layouts_and_rendering.textile @@ -94,7 +94,7 @@ NOTE: The actual rendering is done by subclasses of +ActionView::TemplateHandler h4. Using +render+ -In most cases, the +ActionController::Base#render+ method does the heavy lifting of rendering your application's content for use by a browser. There are a variety of ways to customise the behaviour of +render+. You can render the default view for a Rails template, or a specific template, or a file, or inline code, or nothing at all. You can render text, JSON, or XML. You can specify the content type or HTTP status of the rendered response as well. +In most cases, the +ActionController::Base#render+ method does the heavy lifting of rendering your application's content for use by a browser. There are a variety of ways to customize the behaviour of +render+. You can render the default view for a Rails template, or a specific template, or a file, or inline code, or nothing at all. You can render text, JSON, or XML. You can specify the content type or HTTP status of the rendered response as well. TIP: If you want to see the exact results of a call to +render+ without needing to inspect it in a browser, you can call +render_to_string+. This method takes exactly the same options as +render+, but it returns a string instead of sending a response back to the browser. -- cgit v1.2.3 From 9b9cf92768614eb7dedd190e898b0062c083d8bf Mon Sep 17 00:00:00 2001 From: Carol Nichols Date: Sat, 23 Jul 2011 15:20:39 -0400 Subject: Changing Textile emphasis underscores to em tags; the link with underscores that follows is causing the emphasis underscores to be parsed incorrectly. This appears to be a bug with RedCloth; parsing with official Textile creates the HTML that I expect. I have filed ticket # 226 on RedCloth's lighthouse project and I will attempt to fix the problem with RedCloth. This commit is a workaround for the RedCloth bug that will give this guide the right formatting. --- railties/guides/source/api_documentation_guidelines.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/api_documentation_guidelines.textile b/railties/guides/source/api_documentation_guidelines.textile index 50e86e05a8..bab2be9188 100644 --- a/railties/guides/source/api_documentation_guidelines.textile +++ b/railties/guides/source/api_documentation_guidelines.textile @@ -35,7 +35,7 @@ Use the article "an" for "SQL", as in "an SQL statement". Also "an SQLite databa h3. English -Please use American English (_color_, _center_, _modularize_, etc.). See "a list of American and British English spelling differences here":http://en.wikipedia.org/wiki/American_and_British_English_spelling_differences. +Please use American English (color, center, modularize, etc.). See "a list of American and British English spelling differences here":http://en.wikipedia.org/wiki/American_and_British_English_spelling_differences. h3. Example Code -- cgit v1.2.3 From 71d18ce48ebcb6b3380309a225af12aba2aeb8ed Mon Sep 17 00:00:00 2001 From: Oemuer Oezkir Date: Sun, 24 Jul 2011 10:21:42 +0000 Subject: Changed a few instances of of words in the API docs written in British English to American English(according to Weber) --- .../lib/action_controller/metal/request_forgery_protection.rb | 2 +- actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 +- actionpack/lib/action_view/helpers/form_helper.rb | 4 ++-- actionpack/lib/action_view/helpers/form_tag_helper.rb | 2 +- actionpack/lib/action_view/helpers/url_helper.rb | 8 ++++---- actionpack/test/template/asset_tag_helper_test.rb | 2 +- .../lib/active_record/associations/collection_association.rb | 2 +- activerecord/test/cases/identity_map_test.rb | 4 ++-- activerecord/test/cases/invalid_date_test.rb | 4 ++-- activeresource/lib/active_resource/base.rb | 2 +- activeresource/lib/active_resource/http_mock.rb | 2 +- activesupport/lib/active_support/core_ext/string/multibyte.rb | 2 +- activesupport/lib/active_support/deprecation/behaviors.rb | 4 ++-- railties/lib/rails.rb | 2 +- railties/lib/rails/engine.rb | 10 +++++----- 15 files changed, 26 insertions(+), 26 deletions(-) diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index 258a40aea6..4d016271ea 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -79,7 +79,7 @@ module ActionController #:nodoc: end end - # This is the method that defines the application behaviour when a request is found to be unverified. + # This is the method that defines the application behavior when a request is found to be unverified. # By default, \Rails resets the session when it finds an unverified request. def handle_unverified_request reset_session diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 509c29844a..7d01e5ddb8 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -154,7 +154,7 @@ module ActionView # "/release-#{RELEASE_NUMBER}#{asset_path}" # } # - # This example would cause the following behaviour on all servers no + # This example would cause the following behavior on all servers no # matter when they were deployed: # # image_tag("rails.png") diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 724fe7a518..674eb31b3b 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -259,8 +259,8 @@ module ActionView # :remote => true # # in the options hash creates a form that will allow the unobtrusive JavaScript drivers to modify its - # behaviour. The expected default behaviour is an XMLHttpRequest in the background instead of the regular - # POST arrangement, but ultimately the behaviour is the choice of the JavaScript driver implementor. + # behavior. The expected default behaviour is an XMLHttpRequest in the background instead of the regular + # POST arrangement, but ultimately the behavior is the choice of the JavaScript driver implementor. # Even though it's using JavaScript to serialize the form elements, the form submission will work just like # a regular submission as viewed by the receiving side (all elements available in params). # diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 72bc4510b5..988b4cd3f2 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -30,7 +30,7 @@ module ActionView # (by passing false). # * A list of parameters to feed to the URL the form will be posted to. # * :remote - If set to true, will allow the Unobtrusive JavaScript drivers to control the - # submit behaviour. By default this behaviour is an ajax submit. + # submit behavior. By default this behaviour is an ajax submit. # # ==== Examples # form_tag('/posts') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index d70ae4196b..366ae8f0ab 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -55,8 +55,8 @@ module ActionView # # ==== Relying on named routes # - # Passing a record (like an Active Record or Active Resource) instead of a Hash as the options parameter will - # trigger the named route for that record. The lookup will happen on the name of the class. So passing a + # Passing a record (like an Active Record or Active Resource) instead of a Hash as the options parameter will + # trigger the named route for that record. The lookup will happen on the name of the class. So passing a # Workshop object will attempt to use the +workshop_path+ route. If you have a nested route, such as # +admin_workshop_path+ you'll have to call that explicitly (it's impossible for +url_for+ to guess that route). # @@ -113,7 +113,7 @@ module ActionView end # Creates a link tag of the given +name+ using a URL created by the set of +options+. - # See the valid options in the documentation for +url_for+. It's also possible to + # See the valid options in the documentation for +url_for+. It's also possible to # pass a String instead of an options hash, which generates a link tag that uses the # value of the String as the href for the link. Using a :back Symbol instead # of an options hash will generate a link to the referrer (a JavaScript back link @@ -278,7 +278,7 @@ module ActionView # prompt with the question specified. If the user accepts, the link is # processed normally, otherwise no action is taken. # * :remote - If set to true, will allow the Unobtrusive JavaScript drivers to control the - # submit behaviour. By default this behaviour is an ajax submit. + # submit behavior. By default this behaviour is an ajax submit. # * :form_class - This controls the class of the form within which the submit button will # be placed # diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index d5bd7256f7..e88a3591d8 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -443,7 +443,7 @@ class AssetTagHelperTest < ActionView::TestCase def test_image_tag_windows_behaviour old_asset_id, ENV["RAILS_ASSET_ID"] = ENV["RAILS_ASSET_ID"], "1" - # This simulates the behaviour of File#exist? on windows when testing a file ending in "." + # This simulates the behavior of File#exist? on windows when testing a file ending in "." # If the file "rails.png" exists, windows will return true when asked if "rails.png." exists (notice trailing ".") # OS X, linux etc will return false in this case. File.stubs(:exist?).with('template/../fixtures/public/images/rails.png.').returns(true) diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 3e68f973e7..cec876149c 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -382,7 +382,7 @@ module ActiveRecord persisted.map! do |record| # Unfortunately we cannot simply do memory.delete(record) since on 1.8 this returns - # record rather than memory.at(memory.index(record)). The behaviour is fixed in 1.9. + # record rather than memory.at(memory.index(record)). The behavior is fixed in 1.9. mem_index = memory.index(record) if mem_index diff --git a/activerecord/test/cases/identity_map_test.rb b/activerecord/test/cases/identity_map_test.rb index cd9c358799..3efc8bf559 100644 --- a/activerecord/test/cases/identity_map_test.rb +++ b/activerecord/test/cases/identity_map_test.rb @@ -164,7 +164,7 @@ class IdentityMapTest < ActiveRecord::TestCase end ############################################################################## - # Tests checking dirty attribute behaviour with IM # + # Tests checking dirty attribute behavior with IM # ############################################################################## def test_loading_new_instance_should_not_update_dirty_attributes @@ -238,7 +238,7 @@ class IdentityMapTest < ActiveRecord::TestCase end ############################################################################## - # Tests checking Identity Map behaviour with preloaded associations, joins, # + # Tests checking Identity Map behavior with preloaded associations, joins, # # includes etc. # ############################################################################## diff --git a/activerecord/test/cases/invalid_date_test.rb b/activerecord/test/cases/invalid_date_test.rb index 2de50b224c..98cda010ae 100644 --- a/activerecord/test/cases/invalid_date_test.rb +++ b/activerecord/test/cases/invalid_date_test.rb @@ -24,9 +24,9 @@ class InvalidDateTest < ActiveRecord::TestCase topic = Topic.new({"last_read(1i)" => date_src[0].to_s, "last_read(2i)" => date_src[1].to_s, "last_read(3i)" => date_src[2].to_s}) # Oracle DATE columns are datetime columns and Oracle adapter returns Time value if current_adapter?(:OracleAdapter) - assert_equal(topic.last_read.to_date, Time.local(*date_src).to_date, "The date should be modified according to the behaviour of the Time object") + assert_equal(topic.last_read.to_date, Time.local(*date_src).to_date, "The date should be modified according to the behavior of the Time object") else - assert_equal(topic.last_read, Time.local(*date_src).to_date, "The date should be modified according to the behaviour of the Time object") + assert_equal(topic.last_read, Time.local(*date_src).to_date, "The date should be modified according to the behavior of the Time object") end end end diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 74730ca01f..693bd0592e 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -395,7 +395,7 @@ module ActiveResource # Subclass.site.user = 'david' # Parent.site # => 'http://david@test.com' # - # Without superclass_delegating_reader (expected behaviour) + # Without superclass_delegating_reader (expected behavior) # # Parent.site = 'http://anonymous@test.com' # Subclass.site # => 'http://anonymous@test.com' diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb index 6167c1420e..36f52d61d3 100644 --- a/activeresource/lib/active_resource/http_mock.rb +++ b/activeresource/lib/active_resource/http_mock.rb @@ -149,7 +149,7 @@ module ActiveResource # Note, by default, every time you call +respond_to+, any previous request and response pairs stored # in HttpMock will be deleted giving you a clean slate to work on. # - # If you want to override this behaviour, pass in +false+ as the last argument to +respond_to+ + # If you want to override this behavior, pass in +false+ as the last argument to +respond_to+ # # === Example # diff --git a/activesupport/lib/active_support/core_ext/string/multibyte.rb b/activesupport/lib/active_support/core_ext/string/multibyte.rb index 41de4d6435..aae1cfccf2 100644 --- a/activesupport/lib/active_support/core_ext/string/multibyte.rb +++ b/activesupport/lib/active_support/core_ext/string/multibyte.rb @@ -35,7 +35,7 @@ class String # object. Interoperability problems can be resolved easily with a +to_s+ call. # # For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For - # information about how to change the default Multibyte behaviour see ActiveSupport::Multibyte. + # information about how to change the default Multibyte behavior see ActiveSupport::Multibyte. def mb_chars if ActiveSupport::Multibyte.proxy_class.consumes?(self) ActiveSupport::Multibyte.proxy_class.new(self) diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb index da4af339fc..f9505a247c 100644 --- a/activesupport/lib/active_support/deprecation/behaviors.rb +++ b/activesupport/lib/active_support/deprecation/behaviors.rb @@ -7,12 +7,12 @@ module ActiveSupport # Whether to print a backtrace along with the warning. attr_accessor :debug - # Returns the set behaviour or if one isn't set, defaults to +:stderr+ + # Returns the set behavior or if one isn't set, defaults to +:stderr+ def behavior @behavior ||= [DEFAULT_BEHAVIORS[:stderr]] end - # Sets the behaviour to the specified value. Can be a single value or an array. + # Sets the behavior to the specified value. Can be a single value or an array. # # Examples # diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 603ede3d1e..de412553aa 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -15,7 +15,7 @@ require 'action_dispatch/railtie' # For Ruby 1.8, this initialization sets $KCODE to 'u' to enable the # multibyte safe operations. Plugin authors supporting other encodings -# should override this behaviour and set the relevant +default_charset+ +# should override this behavior and set the relevant +default_charset+ # on ActionController::Base. # # For Ruby 1.9, UTF-8 is the default internal and external encoding. diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index cb897e94d7..c41f7d7c2e 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -220,7 +220,7 @@ module Rails # If an engine is marked as isolated, +FooController+ has access only to helpers from +Engine+ and # url_helpers from MyEngine::Engine.routes. # - # The next thing that changes in isolated engines is the behaviour of routes. Normally, when you namespace + # The next thing that changes in isolated engines is the behavior of routes. Normally, when you namespace # your controllers, you also need to do namespace all your routes. With an isolated engine, # the namespace is applied by default, so you can ignore it in routes: # @@ -232,7 +232,7 @@ module Rails # need to use longer url helpers like my_engine_articles_path. Instead, you should simply use # articles_path as you would do with your application. # - # To make that behaviour consistent with other parts of the framework, an isolated engine also has influence on + # To make that behavior consistent with other parts of the framework, an isolated engine also has influence on # ActiveModel::Naming. When you use a namespaced model, like MyEngine::Article, it will normally # use the prefix "my_engine". In an isolated engine, the prefix will be omitted in url helpers and # form fields for convenience. @@ -404,15 +404,15 @@ module Rails super paths["lib/tasks"].existent.sort.each { |ext| load(ext) } end - + def load_console(app=self) railties.all { |r| r.load_console(app) } super end - + def eager_load! railties.all(&:eager_load!) - + config.eager_load_paths.each do |load_path| matcher = /\A#{Regexp.escape(load_path)}\/(.*)\.rb\Z/ Dir.glob("#{load_path}/**/*.rb").sort.each do |file| -- cgit v1.2.3 From ee5cfdf1204100b35bca849a6935cc3d86361cf1 Mon Sep 17 00:00:00 2001 From: Oemuer Oezkir Date: Sun, 24 Jul 2011 10:40:40 +0000 Subject: Missed a few instances of British English spelling in the last commit oh and obviously I meant according to Webster, not Weber --- actionpack/lib/action_view/helpers/form_helper.rb | 2 +- actionpack/lib/action_view/helpers/form_tag_helper.rb | 2 +- actionpack/lib/action_view/helpers/url_helper.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 674eb31b3b..974c963d44 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -259,7 +259,7 @@ module ActionView # :remote => true # # in the options hash creates a form that will allow the unobtrusive JavaScript drivers to modify its - # behavior. The expected default behaviour is an XMLHttpRequest in the background instead of the regular + # behavior. The expected default behavior is an XMLHttpRequest in the background instead of the regular # POST arrangement, but ultimately the behavior is the choice of the JavaScript driver implementor. # Even though it's using JavaScript to serialize the form elements, the form submission will work just like # a regular submission as viewed by the receiving side (all elements available in params). diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 988b4cd3f2..822686b09d 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -30,7 +30,7 @@ module ActionView # (by passing false). # * A list of parameters to feed to the URL the form will be posted to. # * :remote - If set to true, will allow the Unobtrusive JavaScript drivers to control the - # submit behavior. By default this behaviour is an ajax submit. + # submit behavior. By default this behavior is an ajax submit. # # ==== Examples # form_tag('/posts') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 366ae8f0ab..51baca8e03 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -278,7 +278,7 @@ module ActionView # prompt with the question specified. If the user accepts, the link is # processed normally, otherwise no action is taken. # * :remote - If set to true, will allow the Unobtrusive JavaScript drivers to control the - # submit behavior. By default this behaviour is an ajax submit. + # submit behavior. By default this behavior is an ajax submit. # * :form_class - This controls the class of the form within which the submit button will # be placed # -- cgit v1.2.3 From 3665ffda8352af841b17565eb59d20da5edb2147 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 24 Jul 2011 11:40:06 +0200 Subject: Revert "Tests now require MySQL2 adapter in order to run" Reason: Setting up MySQL and Postgres needs installing servers and libraries that perhaps you don't need in your machine. We think fixing a bug in Active Support without running the suite of Active Record for all possible drivers is OK. That's why we explain first --without db, and after that we cover AR specifically. mysql2 is no different than mysql or pg in that sense. This reverts commit 50d5e0f7e8ab01f3e7b5cf806eb4f9348eeff363. --- .../guides/source/contributing_to_ruby_on_rails.textile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile index ddb82fef65..e6ec061c9a 100644 --- a/railties/guides/source/contributing_to_ruby_on_rails.textile +++ b/railties/guides/source/contributing_to_ruby_on_rails.textile @@ -81,10 +81,10 @@ $ gem install bundler and run: -$ bundle install +$ bundle install --without db -This command will install all dependencies. With dependencies installed, you can run the test suite with: +This command will install all dependencies except the MySQL and PostgreSQL Ruby drivers. We will come back at these soon. With dependencies installed, you can run the test suite with: $ rake test @@ -139,6 +139,15 @@ $ sudo apt-get install mysql-server libmysqlclient15-dev $ sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev +After that run: + + +$ rm .bundle/config +$ bundle install + + +We need first to delete +.bundle/config+ because Bundler remembers in that file that we didn't want to install the "db" group (alternatively you can edit the file). + In order to be able to run the test suite against MySQL you need to create a user named +rails+ with privileges on the test databases: -- cgit v1.2.3 From 25850d17ac670e754945fd39dd024c539e05ee04 Mon Sep 17 00:00:00 2001 From: Mike Howard Date: Sun, 24 Jul 2011 10:54:19 -0600 Subject: Changed wording of paragraph 2.1.1 Models to clarify table/model relationship. changed wording 'one table ... corresponds to one model' to 'each table ...' --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 6aca5d3420..60cd0217ad 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -50,7 +50,7 @@ At the core of Rails is the Model, View, Controller architecture, usually just c h5. Models -A model represents the information (data) of the application and the rules to manipulate that data. In the case of Rails, models are primarily used for managing the rules of interaction with a corresponding database table. In most cases, one table in your database will correspond to one model in your application. The bulk of your application's business logic will be concentrated in the models. +A model represents the information (data) of the application and the rules to manipulate that data. In the case of Rails, models are primarily used for managing the rules of interaction with a corresponding database table. In most cases, each table in your database will correspond to one model in your application. The bulk of your application's business logic will be concentrated in the models. h5. Views -- cgit v1.2.3 From 5712e7aa47b6b4bcf4a0cc23a8d4e53e5df567dd Mon Sep 17 00:00:00 2001 From: Mike Howard Date: Sun, 24 Jul 2011 11:35:51 -0600 Subject: Clarified notes in 3.2 Creating the Blog Application Changed descriptino of Gemfile to add reference to Bundler Changed description of README to add 'You should edit ...' Changed description of Rakefile to reflect dynamic nature of Rakefile and point to app/lib/tasks/ as the place to add app-specific rake tasks. --- railties/guides/source/getting_started.textile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 60cd0217ad..d4a5b58c6b 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -174,9 +174,9 @@ $ cd blog In any case, Rails will create a folder in your working directory called blog. Open up that folder and explore its contents. Most of the work in this tutorial will happen in the app/ folder, but here's a basic rundown on the function of each folder that Rails creates in a new application by default: |_.File/Folder|_.Purpose| -|Gemfile|This file allows you to specify what gem dependencies are needed for your Rails application.| -|README|This is a brief instruction manual for your application. Use it to tell others what your application does, how to set it up, and so on.| -|Rakefile|This file contains batch jobs that can be run from the terminal.| +|Gemfile|This file allows you to specify what gem dependencies are needed for your Rails application. See section on Bundler, below.| +|README|This is a brief instruction manual for your application. You should edit this file to tell others what your application does, how to set it up, and so on.| +|Rakefile|This file locates and loads tasks that can be run from the command line. The task definitions are defined throughout the components of Rails. Rather than changing Rakefile, you should add your own tasks by adding files to the lib/tasks directory of your application.| |app/|Contains the controllers, models, views and assets for your application. You'll focus on this folder for the remainder of this guide.| |config/|Configure your application's runtime rules, routes, database, and more.| |config.ru|Rack configuration for Rack based servers used to start the application.| -- cgit v1.2.3 From 3eb99aab77c04dbd95dfc9f73e03a667f114914f Mon Sep 17 00:00:00 2001 From: Jason Noble & Ralph Shnelvar Date: Sun, 24 Jul 2011 11:42:15 -0600 Subject: Added some context for rack apps, linked to the Rails on Rack guide. --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index d4a5b58c6b..bfb37e887e 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -90,7 +90,7 @@ Action View manages the views of your Rails application. It can create both HTML h5. Action Dispatch -Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application. +Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application. Rack applications are a more advanced topic and are covered in a later guide called "Rails on Rack":http://edgeguides.rubyonrails.org/rails_on_rack.html. h5. Action Mailer -- cgit v1.2.3 From ce66fc047e3e019196b6ac40f882f643de2f159d Mon Sep 17 00:00:00 2001 From: Ken Ip Date: Sun, 24 Jul 2011 14:12:15 -0400 Subject: Update "Getting Started" for Rails 3.1 Add additional files generated by rails 3.1 generator. --- railties/guides/source/getting_started.textile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 6aca5d3420..9875850799 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -386,7 +386,7 @@ $ rails generate scaffold Post name:string title:string content:text NOTE. While scaffolding will get you up and running quickly, the code it generates is unlikely to be a perfect fit for your application. You'll most probably want to customize the generated code. Many experienced Rails developers avoid scaffolding entirely, preferring to write all or most of their source code from scratch. Rails, however, makes it really simple to customize templates for generated models, controllers, views and other source files. You'll find more information in the "Creating and Customizing Rails Generators & Templates":generators.html guide. -The scaffold generator will build 15 files in your application, along with some folders, and edit one more. Here's a quick overview of what it creates: +The scaffold generator will build 17 files in your application, along with some folders, and edit one more. Here's a quick overview of what it creates: |_.File |_.Purpose| |db/migrate/20100207214725_create_posts.rb |Migration to create the posts table in your database (your name will include a different timestamp)| @@ -400,6 +400,8 @@ The scaffold generator will build 15 files in your application, along with some |app/views/posts/_form.html.erb |A partial to control the overall look and feel of the form used in edit and new views| |app/helpers/posts_helper.rb |Helper functions to be used from the post views| |app/assets/stylesheets/scaffold.css.scss |Cascading style sheet to make the scaffolded views look better| +|app/assets/stylesheets/post.css.scss |Cascading style sheet for the posts controller| +|app/assets/javascripts/post.js.coffee |CoffeeScript for the posts controller| |test/unit/post_test.rb |Unit testing harness for the posts model| |test/functional/posts_controller_test.rb |Functional testing harness for the posts controller| |test/unit/helpers/posts_helper_test.rb |Unit testing harness for the posts helper| @@ -920,13 +922,15 @@ With the model in hand, you can turn your attention to creating a matching contr $ rails generate controller Comments -This creates four files and one empty directory: +This creates six files and one empty directory: * +app/controllers/comments_controller.rb+ - The controller * +app/helpers/comments_helper.rb+ - A view helper file * +test/functional/comments_controller_test.rb+ - The functional tests for the controller * +test/unit/helpers/comments_helper_test.rb+ - The unit tests for the helper * +app/views/comments/+ - Views of the controller are stored here +* +app/assets/stylesheets/comment.css.scss+ - Cascading style sheet for the controller +* +app/assets/javascripts/comment.js.coffee+ - CoffeeScript for the controller Like with any blog, our readers will create their comments directly after reading the post, and once they have added their comment, will be sent back to the post show page to see their comment now listed. Due to this, our +CommentsController+ is there to provide a method to create comments and delete SPAM comments when they arrive. -- cgit v1.2.3 From bb746e3362844c82e0c984d2002cd6393dd40950 Mon Sep 17 00:00:00 2001 From: Jason Noble & Ralph Shnelvar Date: Sun, 24 Jul 2011 12:04:21 -0600 Subject: Added explanation to Components of Rails to help users not get hung up on details --- railties/guides/source/getting_started.textile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index a2e60fae0e..a16ead75b7 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -62,7 +62,8 @@ Controllers provide the "glue" between models and views. In Rails, controllers a h4. The Components of Rails -Rails ships as many individual components. +Rails ships as many individual components. Each of these components are briefly explained below. If you are new to Rails, as you read this section, don't get hung up on the details of each component, as they will be +explained in further detail later. For instance, we will bring up Rack applications, but you don't need to know anything about them to continue with this guide. * Action Pack ** Action Controller -- cgit v1.2.3 From 25bcca139f163a024bbbb86ac3ca785c18c1d6e1 Mon Sep 17 00:00:00 2001 From: Jason Noble & Ralph Shnelvar Date: Sun, 24 Jul 2011 12:12:08 -0600 Subject: Added link to the RubyGems User's Guide --- railties/guides/source/getting_started.textile | 1 + 1 file changed, 1 insertion(+) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index a16ead75b7..576ddb18b9 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -20,6 +20,7 @@ This guide is designed for beginners who want to get started with a Rails applic TIP: Note that Ruby 1.8.7 p248 and p249 have marshaling bugs that crash Rails 3.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing. * The "RubyGems":http://rubyforge.org/frs/?group_id=126 packaging system + ** If you want to learn more about RubyGems, please read the "RubyGems User Guide":http://docs.rubygems.org/read/book/1 * A working installation of the "SQLite3 Database":http://www.sqlite.org Rails is a web application framework running on the Ruby programming language. If you have no prior experience with Ruby, you will find a very steep learning curve diving straight into Rails. There are some good free resources on the internet for learning Ruby, including: -- cgit v1.2.3 From 8e44ff63b228509921b346c3ebe138b993e8bf67 Mon Sep 17 00:00:00 2001 From: Jason Noble & Ralph Shnelvar Date: Sun, 24 Jul 2011 12:14:06 -0600 Subject: Update guide to be based on Rails 3.1. --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 576ddb18b9..e952998c20 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -9,7 +9,7 @@ This guide covers getting up and running with Ruby on Rails. After reading it, y endprologue. -WARNING. This Guide is based on Rails 3.0. Some of the code shown here will not work in earlier versions of Rails. +WARNING. This Guide is based on Rails 3.1. Some of the code shown here will not work in earlier versions of Rails. h3. Guide Assumptions -- cgit v1.2.3 From f04725f3ba39c9d9ecdf75cfc398705f1e22f824 Mon Sep 17 00:00:00 2001 From: Jason Noble & Ralph Shnelvar Date: Sun, 24 Jul 2011 12:24:00 -0600 Subject: Modified the content based on vijaydev's comment https://github.com/lifo/docrails/commit/3eb99aab77c04dbd95dfc9f73e03a667f114914f#commitcomment-493737 --- railties/guides/source/getting_started.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index e952998c20..92606681da 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -92,7 +92,7 @@ Action View manages the views of your Rails application. It can create both HTML h5. Action Dispatch -Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application. Rack applications are a more advanced topic and are covered in a later guide called "Rails on Rack":http://edgeguides.rubyonrails.org/rails_on_rack.html. +Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application. Rack applications are a more advanced topic and are covered in a separate guide called "Rails on Rack":http://guides.rubyonrails.org/rails_on_rack.html. h5. Action Mailer -- cgit v1.2.3 From 5e8263b687d9b97b326eb2b265dc0474fee969a9 Mon Sep 17 00:00:00 2001 From: Jason Noble & Ralph Shnelvar Date: Sun, 24 Jul 2011 12:29:15 -0600 Subject: Add link to the Layouts and Rendering guide to explain more on view templates --- railties/guides/source/getting_started.textile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 92606681da..2dd1b3f485 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -88,7 +88,9 @@ Action Controller is the component that manages the controllers in a Rails appli h5. Action View -Action View manages the views of your Rails application. It can create both HTML and XML output by default. Action View manages rendering templates, including nested and partial templates, and includes built-in AJAX support. +Action View manages the views of your Rails application. It can create both HTML and XML output by default. Action View +manages rendering templates, including nested and partial templates, and includes built-in AJAX support. View templates +are covered in more detail in another guide called "Layouts and Rendering":http://edgeguides.rubyonrails.org/layouts_and_rendering.html. h5. Action Dispatch -- cgit v1.2.3 From 48e85d8b8c6f9d23009e2795b347ce18ad6bff90 Mon Sep 17 00:00:00 2001 From: Jason Noble & Ralph Shnelvar Date: Sun, 24 Jul 2011 12:50:23 -0600 Subject: Moved ActionController, ActionView and ActionDispatch sections under ActionPack --- railties/guides/source/getting_started.textile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 2dd1b3f485..cb60b382ab 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -82,17 +82,17 @@ h5. Action Pack Action Pack is a single gem that contains Action Controller, Action View and Action Dispatch. The "VC" part of "MVC". -h5. Action Controller +h6. Action Controller Action Controller is the component that manages the controllers in a Rails application. The Action Controller framework processes incoming requests to a Rails application, extracts parameters, and dispatches them to the intended action. Services provided by Action Controller include session management, template rendering, and redirect management. -h5. Action View +h6. Action View Action View manages the views of your Rails application. It can create both HTML and XML output by default. Action View manages rendering templates, including nested and partial templates, and includes built-in AJAX support. View templates are covered in more detail in another guide called "Layouts and Rendering":http://edgeguides.rubyonrails.org/layouts_and_rendering.html. -h5. Action Dispatch +h6. Action Dispatch Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application. Rack applications are a more advanced topic and are covered in a separate guide called "Rails on Rack":http://guides.rubyonrails.org/rails_on_rack.html. -- cgit v1.2.3 From 0626668374d092a3cf72b16fe24944beffddf804 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 24 Jul 2011 21:01:53 +0200 Subject: little details seen while reviewing --- railties/guides/source/getting_started.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index cb60b382ab..1bdfd79476 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -90,11 +90,11 @@ h6. Action View Action View manages the views of your Rails application. It can create both HTML and XML output by default. Action View manages rendering templates, including nested and partial templates, and includes built-in AJAX support. View templates -are covered in more detail in another guide called "Layouts and Rendering":http://edgeguides.rubyonrails.org/layouts_and_rendering.html. +are covered in more detail in another guide called "Layouts and Rendering":layouts_and_rendering.html. h6. Action Dispatch -Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application. Rack applications are a more advanced topic and are covered in a separate guide called "Rails on Rack":http://guides.rubyonrails.org/rails_on_rack.html. +Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application. Rack applications are a more advanced topic and are covered in a separate guide called "Rails on Rack":rails_on_rack.html. h5. Action Mailer -- cgit v1.2.3