From 9c1b1bd42ce00d43b7894daaf096eff9ee55aef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 2 Aug 2012 15:30:38 -0300 Subject: Use `:data => { :confirm => "Text" }` syntax instead of `:confirm` at the ERB scaffold generator. We are trying to teach the data attributes as best practices and `:confirm` will be deprecated in 4.0. --- railties/CHANGELOG.md | 11 ++++++++--- .../rails/generators/erb/scaffold/templates/index.html.erb | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'railties') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 5bffe75244..2537993df3 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,16 +1,21 @@ ## Rails 3.2.8 ## -* No changes. +* ERB scaffold generator use the `:data => { :confirm => "Text" }` syntax instead of `:confirm`. + + *Rafael Mendonça França* + ## Rails 3.2.7 (Jul 26, 2012) ## -* Since Rails 3.2, use layout false to render no layout -* Use strict_args_position! if available from Thor +* Since Rails 3.2, use layout false to render no layout +* Use strict_args_position! if available from Thor + ## Rails 3.2.6 (Jun 12, 2012) ## * No changes. + ## Rails 3.2.4 (May 31, 2012) ## * Add hook for resource route's generator. *Santiago Pastorino* diff --git a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb index 7b1a2a1841..a7c12b9026 100644 --- a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb +++ b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb @@ -17,7 +17,7 @@ <% end -%> <%%= link_to 'Show', <%= singular_table_name %> %> <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %> - <%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :confirm, "'Are you sure?'" %>, <%= key_value :method, ":delete" %> %> + <%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :confirm, "'Are you sure?'"} }" %> %> <%% end %> -- cgit v1.2.3 From 28f2c6f4037081da0a82104a3f473165ed4ed2ce Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 31 Jul 2012 22:25:54 -0300 Subject: html_escape should escape single quotes https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content Closes #7215 Conflicts: actionpack/test/template/erb_util_test.rb actionpack/test/template/form_tag_helper_test.rb actionpack/test/template/text_helper_test.rb actionpack/test/template/url_helper_test.rb activesupport/lib/active_support/core_ext/string/output_safety.rb --- railties/test/application/assets_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties') diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 673a403fd3..ba32e4904f 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -230,7 +230,7 @@ module ApplicationTests get '/posts' assert_match(/AssetNotPrecompiledError/, last_response.body) - assert_match(/app.js isn't precompiled/, last_response.body) + assert_match(/app.js isn't precompiled/, last_response.body) end test "assets raise AssetNotPrecompiledError when manifest file is present and requested file isn't precompiled if digest is disabled" do @@ -254,7 +254,7 @@ module ApplicationTests get '/posts' assert_match(/AssetNotPrecompiledError/, last_response.body) - assert_match(/app.js isn't precompiled/, last_response.body) + assert_match(/app.js isn't precompiled/, last_response.body) end test "precompile properly refers files referenced with asset_path and and run in the provided RAILS_ENV" do -- cgit v1.2.3 From 65b5e35e898ac09a50b61c671d98a3cf92453003 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Fri, 3 Aug 2012 11:01:50 -0300 Subject: Bump to 3.2.8.rc2 --- railties/lib/rails/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/lib/rails/version.rb b/railties/lib/rails/version.rb index e429caa157..b0279a4be8 100644 --- a/railties/lib/rails/version.rb +++ b/railties/lib/rails/version.rb @@ -3,7 +3,7 @@ module Rails MAJOR = 3 MINOR = 2 TINY = 8 - PRE = "rc1" + PRE = "rc2" STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.') end -- cgit v1.2.3 From ddedf5d88e79b0d654d0266b53f2a66260d047ce Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 9 Aug 2012 16:25:43 -0300 Subject: Add release date to CHANGELOGs --- railties/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 2537993df3..52494d5232 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,4 +1,4 @@ -## Rails 3.2.8 ## +## Rails 3.2.8 (Aug 9, 2012) ## * ERB scaffold generator use the `:data => { :confirm => "Text" }` syntax instead of `:confirm`. -- cgit v1.2.3 From 64146cf7babe35fd962576b699fa0deb4cfe0d70 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 9 Aug 2012 16:26:36 -0300 Subject: Bump to 3.2.8 --- railties/lib/rails/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/lib/rails/version.rb b/railties/lib/rails/version.rb index b0279a4be8..4565e13fc7 100644 --- a/railties/lib/rails/version.rb +++ b/railties/lib/rails/version.rb @@ -3,7 +3,7 @@ module Rails MAJOR = 3 MINOR = 2 TINY = 8 - PRE = "rc2" + PRE = nil STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.') end -- cgit v1.2.3