diff options
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/migrations.textile | 6 | ||||
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.textile | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/guides/source/migrations.textile b/guides/source/migrations.textile index 0173f8ecc6..e89bde7a83 100644 --- a/guides/source/migrations.textile +++ b/guides/source/migrations.textile @@ -912,14 +912,14 @@ If +:ruby+ is selected then the schema is stored in +db/schema.rb+. If you look at this file you'll find that it looks an awful lot like one very big migration: <ruby> -ActiveRecord::Schema.define(:version => 20080906171750) do - create_table "authors", :force => true do |t| +ActiveRecord::Schema.define(version: 20080906171750) do + create_table "authors", force: true do |t| t.string "name" t.datetime "created_at" t.datetime "updated_at" end - create_table "products", :force => true do |t| + create_table "products", force: true do |t| t.string "name" t.text "description" t.datetime "created_at" diff --git a/guides/source/upgrading_ruby_on_rails.textile b/guides/source/upgrading_ruby_on_rails.textile index 52c582ffbc..b750cc2ffb 100644 --- a/guides/source/upgrading_ruby_on_rails.textile +++ b/guides/source/upgrading_ruby_on_rails.textile @@ -54,11 +54,21 @@ h4(#action_pack4_0). Action Pack Rails 4.0 changed how <tt>assert_generates</tt>, <tt>assert_recognizes</tt>, and <tt>assert_routing</tt> work. Now all these assertions raise <tt>Assertion</tt> instead of <tt>ActionController::RoutingError</tt>. -Rails 4.0 also changed the way unicode character routes are drawn. Now you can draw unicode character routes directly. If you already draw such routes, you must change them, e.g. <tt>get Rack::Utils.escape('こんにちは'), :controller => 'welcome', :action => 'index'</tt> to <tt>get 'こんにちは', :controller => 'welcome', :action => 'index'</tt>. +Rails 4.0 also changed the way unicode character routes are drawn. Now you can draw unicode character routes directly. If you already draw such routes, you must change them, for example: + +<ruby> +get Rack::Utils.escape('こんにちは'), :controller => 'welcome', :action => 'index' +</ruby> + +becomes + +<ruby> +get 'こんにちは', :controller => 'welcome', :action => 'index' +</ruby> h4(#active_support4_0). Active Support -Rails 4.0 Removed the `j` alias for `ERB::Util#json_escape` since `j` is already used for `ActionView::Helpers::JavaScriptHelper#escape_javascript`. +Rails 4.0 Removed the <tt>j</tt> alias for <tt>ERB::Util#json_escape</tt> since <tt>j</tt> is already used for <tt>ActionView::Helpers::JavaScriptHelper#escape_javascript</tt>. h4(#helpers_order). Helpers Loading Order |