From c921ba97b80c50f22373ba8779d6a8587511c2f8 Mon Sep 17 00:00:00 2001 From: Jason Noble Date: Mon, 5 Dec 2011 05:22:13 -0700 Subject: Remove redundant or --- railties/guides/source/migrations.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/migrations.textile b/railties/guides/source/migrations.textile index e67be0ae9f..92356edf90 100644 --- a/railties/guides/source/migrations.textile +++ b/railties/guides/source/migrations.textile @@ -541,7 +541,7 @@ Note that running the +db:migrate+ also invokes the +db:schema:dump+ task, which will update your db/schema.rb file to match the structure of your database. If you specify a target version, Active Record will run the required migrations -(up or down or change) until it has reached the specified version. The version +(up, down or change) until it has reached the specified version. The version is the numerical prefix on the migration's filename. For example, to migrate to version 20080906120000 run -- cgit v1.2.3 From c9cc535d2be6a30ee0f921c996f5d27c62070f66 Mon Sep 17 00:00:00 2001 From: Sergey Parizhskiy Date: Mon, 5 Dec 2011 16:25:02 +0200 Subject: changes in the way of how the stylesheets_link_tag works --- railties/guides/source/layouts_and_rendering.textile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile index 6c050e27d6..8ff2408d16 100644 --- a/railties/guides/source/layouts_and_rendering.textile +++ b/railties/guides/source/layouts_and_rendering.textile @@ -744,7 +744,7 @@ And use them by referencing them exactly like +:defaults+: <%= javascript_include_tag :projects %> -When using :defaults, if an application.js file exists in public/javascripts it will be included as well at then end. +When using :defaults, if an application.js file exists in public/javascripts it will be included as well at the end. Also, if the Asset Pipeline is disabled, the +:all+ expansion loads every JavaScript file in +public/javascripts+: @@ -777,19 +777,23 @@ You can even use dynamic paths such as +cache/#{current_site}/main/display+. h5. Linking to CSS Files with the +stylesheet_link_tag+ -The +stylesheet_link_tag+ helper returns an HTML +<link>+ tag for each source provided. Rails looks in +public/stylesheets+ for these files by default, but you can specify a full path relative to the document root, or a URL, if you prefer. For example, to include +public/stylesheets/main.css+: +The +stylesheet_link_tag+ helper returns an HTML +<link>+ tag for each source provided. + +If you are using Rails with the "Asset Pipeline" enabled, this helper will generate a link to +/assets/stylesheets/+. This link is then processed by the Sprockets gem. A stylesheet file can be stored in one of three locations: +app/assets+, +lib/assets+ or +vendor/assets+. + +You can specify a full path relative to the document root, or a URL. For example, to link to a stylesheet file that is inside a directory called +stylesheets+ inside of one of +app/assets+, +lib/assets+ or +vendor/assets+, you would do this: <%= stylesheet_link_tag "main" %> -To include +public/stylesheets/main.css+ and +public/stylesheets/columns.css+: +To include +app/assets/stylesheets/main.css+ and +app/assets/stylesheets/columns.css+: <%= stylesheet_link_tag "main", "columns" %> -To include +public/stylesheets/main.css+ and +public/photos/columns.css+: +To include +vendor/assets/stylesheets/main.css+ and +lib/assets/stylesheets/photos/columns.css+: <%= stylesheet_link_tag "main", "/photos/columns" %> @@ -807,7 +811,7 @@ By default, the +stylesheet_link_tag+ creates links with +media="screen" rel="st <%= stylesheet_link_tag "main_print", :media => "print" %> -The +all+ option links every CSS file in +public/stylesheets+: +If the Asset Pipeline is disabled, the +all+ option links every CSS file in +public/stylesheets+: <%= stylesheet_link_tag :all %> -- cgit v1.2.3 From 8a67b632ae320e1983d8170f9c348c5a6333c9af Mon Sep 17 00:00:00 2001 From: sandeepravi Date: Tue, 6 Dec 2011 17:22:48 +0530 Subject: Added wiki link for REST --- railties/guides/source/action_controller_overview.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/action_controller_overview.textile b/railties/guides/source/action_controller_overview.textile index b34c223b31..a55b7ba762 100644 --- a/railties/guides/source/action_controller_overview.textile +++ b/railties/guides/source/action_controller_overview.textile @@ -16,7 +16,7 @@ h3. What Does a Controller Do? Action Controller is the C in MVC. After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. Luckily, Action Controller does most of the groundwork for you and uses smart conventions to make this as straightforward as possible. -For most conventional RESTful applications, the controller will receive the request (this is invisible to you as the developer), fetch or save data from a model and use a view to create HTML output. If your controller needs to do things a little differently, that's not a problem, this is just the most common way for a controller to work. +For most conventional {REST}[http://en.wikipedia.org/wiki/Representational_state_transfer]ful applications, the controller will receive the request (this is invisible to you as the developer), fetch or save data from a model and use a view to create HTML output. If your controller needs to do things a little differently, that's not a problem, this is just the most common way for a controller to work. A controller can thus be thought of as a middle man between models and views. It makes the model data available to the view so it can display that data to the user, and it saves or updates data from the user to the model. -- cgit v1.2.3 From bc994470c49fb17a6f984513c1299b94616ab83f Mon Sep 17 00:00:00 2001 From: sandeepravi Date: Tue, 6 Dec 2011 17:50:16 +0530 Subject: Added wiki link to REST --- railties/guides/source/action_controller_overview.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/action_controller_overview.textile b/railties/guides/source/action_controller_overview.textile index a55b7ba762..965da9f7dc 100644 --- a/railties/guides/source/action_controller_overview.textile +++ b/railties/guides/source/action_controller_overview.textile @@ -16,7 +16,7 @@ h3. What Does a Controller Do? Action Controller is the C in MVC. After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. Luckily, Action Controller does most of the groundwork for you and uses smart conventions to make this as straightforward as possible. -For most conventional {REST}[http://en.wikipedia.org/wiki/Representational_state_transfer]ful applications, the controller will receive the request (this is invisible to you as the developer), fetch or save data from a model and use a view to create HTML output. If your controller needs to do things a little differently, that's not a problem, this is just the most common way for a controller to work. +For most conventional RESTful applications, the controller will receive the request (this is invisible to you as the developer), fetch or save data from a model and use a view to create HTML output. If your controller needs to do things a little differently, that's not a problem, this is just the most common way for a controller to work. A controller can thus be thought of as a middle man between models and views. It makes the model data available to the view so it can display that data to the user, and it saves or updates data from the user to the model. -- cgit v1.2.3 From 7e12aa7424d6db5468be0c78a4409e90d4454859 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 6 Dec 2011 13:26:22 +0100 Subject: Added git --rebase option for pulling rails master --- railties/guides/source/contributing_to_ruby_on_rails.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile index 37ead2bff2..92cb0774de 100644 --- a/railties/guides/source/contributing_to_ruby_on_rails.textile +++ b/railties/guides/source/contributing_to_ruby_on_rails.textile @@ -336,7 +336,7 @@ It’s pretty likely that other changes to master have happened while you were w $ git checkout master -$ git pull +$ git pull --rebase Now reapply your patch on top of the latest changes: -- cgit v1.2.3 From cec909d938ba2ff43293249291ce91320a7fbf05 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 6 Dec 2011 22:49:22 +0530 Subject: copy edits in layouts guide, change links to be relative --- railties/guides/source/layouts_and_rendering.textile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile index 8ff2408d16..a0ab34960d 100644 --- a/railties/guides/source/layouts_and_rendering.textile +++ b/railties/guides/source/layouts_and_rendering.textile @@ -673,9 +673,9 @@ h5. Linking to JavaScript Files with the +javascript_include_tag+ The +javascript_include_tag+ helper returns an HTML +script+ tag for each source provided. -If you are using Rails with the "Asset Pipeline":http://guides.rubyonrails.org/asset_pipeline.html enabled, this helper will generate a link to +/assets/javascripts/+ rather than +public/javascripts+ which was used in earlier versions of Rails. This link is then served by the Sprockets gem, which was introduced in Rails 3.1. +If you are using Rails with the "Asset Pipeline":asset_pipeline.html enabled, this helper will generate a link to +/assets/javascripts/+ rather than +public/javascripts+ which was used in earlier versions of Rails. This link is then served by the Sprockets gem, which was introduced in Rails 3.1. -A JavaScript file within a Rails application or Rails engine goes in one of three locations: +app/assets+, +lib/assets+ or +vendor/assets+. These locations are explained in detail in the "Asset Organisation section in the Asset Pipeline Guide":http://guides.rubyonrails.org/asset_pipeline.html#asset-organization +A JavaScript file within a Rails application or Rails engine goes in one of three locations: +app/assets+, +lib/assets+ or +vendor/assets+. These locations are explained in detail in the "Asset Organization section in the Asset Pipeline Guide":asset_pipeline.html#asset-organization You can specify a full path relative to the document root, or a URL, if you prefer. For example, to link to a JavaScript file that is inside a directory called +javascripts+ inside of one of +app/assets+, +lib/assets+ or +vendor/assets+, you would do this: @@ -724,7 +724,7 @@ Outputting +script+ tags such as this: These two files for jQuery, +jquery.js+ and +jquery_ujs.js+ must be placed inside +public/javascripts+ if the application doesn't use the asset pipeline. These files can be downloaded from the "jquery-rails repository on GitHub":https://github.com/indirect/jquery-rails/tree/master/vendor/assets/javascripts -WARNING: If you are using the Asset Pipeline, this tag will render a +script+ tag for an asset called +defaults.js+, which would not exist in your application unless you've explicitly defined it to be. +WARNING: If you are using the asset pipeline, this tag will render a +script+ tag for an asset called +defaults.js+, which would not exist in your application unless you've explicitly defined it to be. And you can in any case override the +:defaults+ expansion in config/application.rb: @@ -746,7 +746,7 @@ And use them by referencing them exactly like +:defaults+: When using :defaults, if an application.js file exists in public/javascripts it will be included as well at the end. -Also, if the Asset Pipeline is disabled, the +:all+ expansion loads every JavaScript file in +public/javascripts+: +Also, if the asset pipeline is disabled, the +:all+ expansion loads every JavaScript file in +public/javascripts+: <%= javascript_include_tag :all %> @@ -793,7 +793,7 @@ To include +app/assets/stylesheets/main.css+ and +app/assets/stylesheets/columns <%= stylesheet_link_tag "main", "columns" %> -To include +vendor/assets/stylesheets/main.css+ and +lib/assets/stylesheets/photos/columns.css+: +To include +app/assets/stylesheets/main.css+ and +app/assets/stylesheets/photos/columns.css+: <%= stylesheet_link_tag "main", "/photos/columns" %> @@ -811,7 +811,7 @@ By default, the +stylesheet_link_tag+ creates links with +media="screen" rel="st <%= stylesheet_link_tag "main_print", :media => "print" %> -If the Asset Pipeline is disabled, the +all+ option links every CSS file in +public/stylesheets+: +If the asset pipeline is disabled, the +all+ option links every CSS file in +public/stylesheets+: <%= stylesheet_link_tag :all %> -- cgit v1.2.3 From d1bf7db55d08ddd73f204df7fc1f7e08ff6f7b97 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 6 Dec 2011 22:50:24 +0530 Subject: rxml and rhtml are no longer searched for source code annotations --- railties/guides/source/command_line.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/command_line.textile b/railties/guides/source/command_line.textile index 3fa6c059e1..7a3da134ac 100644 --- a/railties/guides/source/command_line.textile +++ b/railties/guides/source/command_line.textile @@ -420,7 +420,7 @@ The +doc:+ namespace has the tools to generate documentation for your app, API d h4. +notes+ -+rake notes+ will search through your code for comments beginning with FIXME, OPTIMIZE or TODO. The search is only done in files with extension +.builder+, +.rb+, +.rxml+, +.rhtml+ and +.erb+ for both default and custom annotations. ++rake notes+ will search through your code for comments beginning with FIXME, OPTIMIZE or TODO. The search is only done in files with extension +.builder+, +.rb+ and +.erb+ for both default and custom annotations. $ rake notes -- cgit v1.2.3 From 078b4b54a6ce655854bae5f9f931423410d46ff8 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 6 Dec 2011 22:51:07 +0530 Subject: use textile syntax in links --- railties/guides/source/action_controller_overview.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/action_controller_overview.textile b/railties/guides/source/action_controller_overview.textile index 965da9f7dc..bc85f07ecc 100644 --- a/railties/guides/source/action_controller_overview.textile +++ b/railties/guides/source/action_controller_overview.textile @@ -16,7 +16,7 @@ h3. What Does a Controller Do? Action Controller is the C in MVC. After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. Luckily, Action Controller does most of the groundwork for you and uses smart conventions to make this as straightforward as possible. -For most conventional RESTful applications, the controller will receive the request (this is invisible to you as the developer), fetch or save data from a model and use a view to create HTML output. If your controller needs to do things a little differently, that's not a problem, this is just the most common way for a controller to work. +For most conventional "RESTful":http://en.wikipedia.org/wiki/Representational_state_transfer applications, the controller will receive the request (this is invisible to you as the developer), fetch or save data from a model and use a view to create HTML output. If your controller needs to do things a little differently, that's not a problem, this is just the most common way for a controller to work. A controller can thus be thought of as a middle man between models and views. It makes the model data available to the view so it can display that data to the user, and it saves or updates data from the user to the model. -- cgit v1.2.3