aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-09-11 17:41:39 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-09-11 17:41:39 +0530
commit95fdaf965a89e14840bfce79ed8aa6f4a9db08d8 (patch)
tree9cd6f063cb165f33b4f45c16c17610cecf3b5cb6 /railties
parenta9509284cad9047693f8e5d74248ad307ab5b23d (diff)
parent715b0996ca9ec8b7e8db614e1aa339b0cfa77a7d (diff)
downloadrails-95fdaf965a89e14840bfce79ed8aa6f4a9db08d8.tar.gz
rails-95fdaf965a89e14840bfce79ed8aa6f4a9db08d8.tar.bz2
rails-95fdaf965a89e14840bfce79ed8aa6f4a9db08d8.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/active_support_core_extensions.textile2
-rw-r--r--railties/guides/source/asset_pipeline.textile6
-rw-r--r--railties/guides/source/getting_started.textile10
3 files changed, 9 insertions, 9 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index b2436a2e68..9e2fe2c694 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -1020,7 +1020,7 @@ class A
class_attribute :x, :instance_reader => false
end
-A.x = 1 # NoMethodError
+A.new.x = 1 # NoMethodError
</ruby>
For convenience +class_attribute+ also defines an instance predicate which is the double negation of what the instance reader returns. In the examples above it would be called +x?+.
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index bad1c08747..211b02b94b 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -282,7 +282,7 @@ When debug mode is off Sprockets will concatenate and run the necessary preproce
<script src='/assets/application.js'></script>
</html>
-Assets are compiled and cached on the first request after the server is started. Sprockets sets a +must-validate+ Cache-Control HTTP header to reduce request overhead on subsequent requests -- on these the browser gets a 304 (not-modified) response.
+Assets are compiled and cached on the first request after the server is started. Sprockets sets a +must-revalidate+ Cache-Control HTTP header to reduce request overhead on subsequent requests -- on these the browser gets a 304 (not-modified) response.
If any of the files in the manifest have changed between requests, the server responds with a new compiled file.
@@ -415,12 +415,12 @@ For Apache:
RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^(.+) $1.gz [L]
</LocationMatch>
-
+
# without these, Content-Type will be "application/x-gzip"
<FilesMatch "^/assets/.*\.css.gz$">
ForceType text/css
</FilesMatch>
-
+
<FilesMatch "^/assets/.*\.js.gz$">
ForceType text/javascript
</FilesMatch>
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index f4a61482c6..1587b20c18 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -549,9 +549,9 @@ folders, and edit <tt>config/routes.rb</tt>. Here's a quick overview of what it
|app/views/posts/new.html.erb |A view to create a new post|
|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/scaffolds.css.scss |Cascading style sheet to make the scaffolded views look better|
-|app/assets/stylesheets/posts.css.scss |Cascading style sheet for the posts controller|
-|app/assets/javascripts/posts.js.coffee |CoffeeScript for the posts controller|
+|app/assets/stylesheets/scaffolds.css.scss |Cascading style sheet to make the scaffolded views look better|
+|app/assets/stylesheets/posts.css.scss |Cascading style sheet for the posts controller|
+|app/assets/javascripts/posts.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|
@@ -821,8 +821,8 @@ this layout in your editor and modify the +body+ tag:
<html>
<head>
<title>Blog</title>
- <%= stylesheet_link_tag :all %>
- <%= javascript_include_tag :defaults %>
+ <%= stylesheet_link_tag "application" %>
+ <%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body style="background: #EEEEEE;">