From f28f1d70b3f3dd9f694067f7cab2e717e302ee2b Mon Sep 17 00:00:00 2001 From: Patrick Sharp Date: Mon, 9 Apr 2012 08:54:02 -0500 Subject: add instructions for adding additional manifests --- guides/source/asset_pipeline.textile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/asset_pipeline.textile b/guides/source/asset_pipeline.textile index 982c4aa096..a8d0ac3077 100644 --- a/guides/source/asset_pipeline.textile +++ b/guides/source/asset_pipeline.textile @@ -290,7 +290,11 @@ In this example +require_self+ is used. This puts the CSS contained within the f NOTE. If you want to use multiple Sass files, you should generally use the "Sass +@import+ rule":http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#import instead of these Sprockets directives. Using Sprockets directives all Sass files exist within their own scope, making variables or mixins only available within the document they were defined in. -You can have as many manifest files as you need. For example the +admin.css+ and +admin.js+ manifest could contain the JS and CSS files that are used for the admin section of an application. +You can have as many manifest files as you need. For example the +admin.css+ and +admin.js+ manifest could contain the JS and CSS files that are used for the admin section of an application. In order for the pipeline to know about the additional manifest, it has to be added to application.rb. + + +config.assets.precompile += %w( admin.css ) + The same remarks about ordering made above apply. In particular, you can specify individual files and they are compiled in the order specified. For example, you might concatenate three CSS files together this way: -- cgit v1.2.3 From 4fb6527e2c8d0c5dd670cc3d9a6184efc8055938 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Wed, 11 Apr 2012 22:39:36 +0530 Subject: Revert "add instructions for adding additional manifests" This reverts commit f28f1d70b3f3dd9f694067f7cab2e717e302ee2b. Reason: This is already covered in this guide elsewhere. --- guides/source/asset_pipeline.textile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'guides/source') diff --git a/guides/source/asset_pipeline.textile b/guides/source/asset_pipeline.textile index a8d0ac3077..982c4aa096 100644 --- a/guides/source/asset_pipeline.textile +++ b/guides/source/asset_pipeline.textile @@ -290,11 +290,7 @@ In this example +require_self+ is used. This puts the CSS contained within the f NOTE. If you want to use multiple Sass files, you should generally use the "Sass +@import+ rule":http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#import instead of these Sprockets directives. Using Sprockets directives all Sass files exist within their own scope, making variables or mixins only available within the document they were defined in. -You can have as many manifest files as you need. For example the +admin.css+ and +admin.js+ manifest could contain the JS and CSS files that are used for the admin section of an application. In order for the pipeline to know about the additional manifest, it has to be added to application.rb. - - -config.assets.precompile += %w( admin.css ) - +You can have as many manifest files as you need. For example the +admin.css+ and +admin.js+ manifest could contain the JS and CSS files that are used for the admin section of an application. The same remarks about ordering made above apply. In particular, you can specify individual files and they are compiled in the order specified. For example, you might concatenate three CSS files together this way: -- cgit v1.2.3 From 63bd01d82fb4b4f62a6842db5edcd60a60efa964 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Wed, 11 Apr 2012 17:10:21 -0300 Subject: Grammar fix in 3.2 Release Notes guide Could also be worded 'as an option', but plural made more sense given the mention of ':handlers and :formats'. --- guides/source/3_2_release_notes.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/3_2_release_notes.textile b/guides/source/3_2_release_notes.textile index 0f8fea2bf6..3524ea6595 100644 --- a/guides/source/3_2_release_notes.textile +++ b/guides/source/3_2_release_notes.textile @@ -299,7 +299,7 @@ end h5(#actionview_deprecations). Deprecations -* Passing formats or handlers to render :template and friends like render :template => "foo.html.erb" is deprecated. Instead, you can provide :handlers and :formats directly as an options: render :template => "foo", :formats => [:html, :js], :handlers => :erb. +* Passing formats or handlers to render :template and friends like render :template => "foo.html.erb" is deprecated. Instead, you can provide :handlers and :formats directly as options: render :template => "foo", :formats => [:html, :js], :handlers => :erb. h4. Sprockets -- cgit v1.2.3 From 05ac3921f85663416fe8a4287b05db3284276b24 Mon Sep 17 00:00:00 2001 From: Alfonso Cora Date: Thu, 12 Apr 2012 12:20:12 -0300 Subject: Fixed markup in security guide --- guides/source/security.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/security.textile b/guides/source/security.textile index 747a4d6791..c065529cac 100644 --- a/guides/source/security.textile +++ b/guides/source/security.textile @@ -385,7 +385,7 @@ params[:user] # => {:name => “ow3ned”, :admin => true} So if you create a new user using mass-assignment, it may be too easy to become an administrator. -Note that this vulnerability is not restricted to database columns. Any setter method, unless explicitly protected, is accessible via the attributes= method. In fact, this vulnerability is extended even further with the introduction of nested mass assignment (and nested object forms) in Rails 2.3. The +accepts_nested_attributes_for+ declaration provides us the ability to extend mass assignment to model associations (+has_many+, +has_one+, +has_and_belongs_to_many+). For example: +Note that this vulnerability is not restricted to database columns. Any setter method, unless explicitly protected, is accessible via the attributes= method. In fact, this vulnerability is extended even further with the introduction of nested mass assignment (and nested object forms) in Rails 2.3. The +accepts_nested_attributes_for+ declaration provides us the ability to extend mass assignment to model associations (+has_many+, +has_one+, +has_and_belongs_to_many+). For example: class Person < ActiveRecord::Base -- cgit v1.2.3