From e410b5bff7d9a389f2c72f0ae4a51e5a558c6c54 Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 18 Nov 2012 09:34:59 +0100 Subject: Fix broken link in Active Record Query Interface guide --- guides/source/active_record_querying.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 79d00ded0a..32c139df99 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -985,7 +985,7 @@ SELECT categories.* FROM categories ### Specifying Conditions on the Joined Tables -You can specify conditions on the joined tables using the regular [Array](array-conditions) and [String](#pure-string-conditions) conditions. [Hash conditions](#hash-conditions) provides a special syntax for specifying conditions for the joined tables: +You can specify conditions on the joined tables using the regular [Array](#array-conditions) and [String](#pure-string-conditions) conditions. [Hash conditions](#hash-conditions) provides a special syntax for specifying conditions for the joined tables: ```ruby time_range = (Time.now.midnight - 1.day)..Time.now.midnight -- cgit v1.2.3 From 62c34f0df29e3c33a632f54e8bd1ae350a14c15f Mon Sep 17 00:00:00 2001 From: Michel Grootjans Date: Tue, 20 Nov 2012 14:18:05 +0100 Subject: bug in example '<%= form_for ...' should be '<% form_for ...' --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/engines.md b/guides/source/engines.md index f9bbff1c4c..caa2e53f52 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -341,7 +341,7 @@ Next, the partial that this line will render needs to exist. Create a new direct ```html+erb

New comment

-<%= form_for [@post, @post.comments.build] do |f| %> +<% form_for [@post, @post.comments.build] do |f| %>

<%= f.label :text %>
<%= f.text_area :text %> -- cgit v1.2.3 From 7521698c1741d40da28dbcf95e6cd45a704d337d Mon Sep 17 00:00:00 2001 From: Michel Grootjans Date: Tue, 20 Nov 2012 14:19:04 +0100 Subject: remove previous commit --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/engines.md b/guides/source/engines.md index caa2e53f52..f9bbff1c4c 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -341,7 +341,7 @@ Next, the partial that this line will render needs to exist. Create a new direct ```html+erb

New comment

-<% form_for [@post, @post.comments.build] do |f| %> +<%= form_for [@post, @post.comments.build] do |f| %>

<%= f.label :text %>
<%= f.text_area :text %> -- cgit v1.2.3 From ceb1fd34a8b1c6d415bf517e7752c059a3ab386d Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Tue, 20 Nov 2012 16:17:13 +0300 Subject: embed code example using backticks in caching guide --- guides/source/caching_with_rails.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source') diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md index 4cb76bfe5f..826ddd264a 100644 --- a/guides/source/caching_with_rails.md +++ b/guides/source/caching_with_rails.md @@ -465,14 +465,14 @@ end Instead of a options hash, you can also simply pass in a model, Rails will use the `updated_at` and `cache_key` methods for setting `last_modified` and `etag`: - +```ruby class ProductsController < ApplicationController def show @product = Product.find(params[:id]) respond_with(@product) if stale?(@product) end end - +``` If you don't have any special response processing and are using the default rendering mechanism (i.e. you're not using respond_to or calling render yourself) then you’ve got an easy helper in fresh_when: -- cgit v1.2.3 From 58594331565d7e241f63a3cc6562e4a99a5077e8 Mon Sep 17 00:00:00 2001 From: Lennart Tange Date: Tue, 20 Nov 2012 15:39:21 +0100 Subject: fixed a minor spelling error --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/engines.md b/guides/source/engines.md index f9bbff1c4c..d8f5796dde 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -699,7 +699,7 @@ This section explains how to add and/or override engine MVC functionality in the ### Overriding Models and Controllers -Engine model and controller classes can be extended by open classing them in the main Rails application (since model and controller classes are just Ruby classes that inherit Rails specific functionality). Open classing an Engine class redefines it for use in the main applicaiton. This is usually implemented by using the decorator pattern. +Engine model and controller classes can be extended by open classing them in the main Rails application (since model and controller classes are just Ruby classes that inherit Rails specific functionality). Open classing an Engine class redefines it for use in the main application. This is usually implemented by using the decorator pattern. For simple class modifications use `Class#class_eval`, and for complex class modifications, consider using `ActiveSupport::Concern`. -- cgit v1.2.3