Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lifo/docrails
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev committed Nov 18, 2011
2 parents 2debbe1 + 9d03529 commit 48b580a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion actionpack/lib/action_view/helpers/number_helper.rb
Expand Up @@ -193,7 +193,8 @@ def number_to_percentage(number, options = {})
# number_with_delimiter(12345678) # => 12,345,678 # number_with_delimiter(12345678) # => 12,345,678
# number_with_delimiter(12345678.05) # => 12,345,678.05 # number_with_delimiter(12345678.05) # => 12,345,678.05
# number_with_delimiter(12345678, :delimiter => ".") # => 12.345.678 # number_with_delimiter(12345678, :delimiter => ".") # => 12.345.678
# number_with_delimiter(12345678, :separator => ",") # => 12,345,678 # number_with_delimiter(12345678, :delimiter => ",") # => 12,345,678
# number_with_delimiter(12345678.05, :separator => " ") # => 12,345,678 05
# number_with_delimiter(12345678.05, :locale => :fr) # => 12 345 678,05 # number_with_delimiter(12345678.05, :locale => :fr) # => 12 345 678,05
# number_with_delimiter(98765432.98, :delimiter => " ", :separator => ",") # number_with_delimiter(98765432.98, :delimiter => " ", :separator => ",")
# # => 98 765 432,98 # # => 98 765 432,98
Expand Down
2 changes: 1 addition & 1 deletion railties/guides/source/asset_pipeline.textile
Expand Up @@ -438,7 +438,7 @@ location ~ ^/assets/ {
} }
</plain> </plain>


When files are precompiled, Sprockets also creates a "gzipped":http://en.wikipedia.org/wiki/Gzip (.gz) version of your assets. Web servers are typically configured to use a moderate compression ratio as a compromise, but since precompilation happens once Sprockets uses the maximum compression ratio, thus reducing the size of the data transfer to the minimum. On the other hand, web servers can be configured to serve compressed content directly from disk, rather than deflating non-compressed files themselves. When files are precompiled, Sprockets also creates a "gzipped":http://en.wikipedia.org/wiki/Gzip (.gz) version of your assets. Web servers are typically configured to use a moderate compression ratio as a compromise, but since precompilation happens once, Sprockets uses the maximum compression ratio, thus reducing the size of the data transfer to the minimum. On the other hand, web servers can be configured to serve compressed content directly from disk, rather than deflating non-compressed files themselves.


Nginx is able to do this automatically enabling +gzip_static+: Nginx is able to do this automatically enabling +gzip_static+:


Expand Down
Expand Up @@ -215,7 +215,7 @@ TIP: You may want to "put your git branch name in your shell prompt":http://qugs


h3. Helping to Resolve Existing Issues h3. Helping to Resolve Existing Issues


As a next step beyond reporting issues, you can help the core team resolve existing issues. If you check the "Everyone's Issues":https://github.com/rails/rails/issues?sort=created&direction=desc&state=open&page=1 list in GitHub Issues, you'll find lots of issues already requiring attention. What can you do for these? Quite a bit, actually: As a next step beyond reporting issues, you can help the core team resolve existing issues. If you check the "Everyone's Issues":https://github.com/rails/rails/issues list in GitHub Issues, you'll find lots of issues already requiring attention. What can you do for these? Quite a bit, actually:


h4. Verifying Bug Reports h4. Verifying Bug Reports


Expand Down
16 changes: 8 additions & 8 deletions railties/guides/source/getting_started.textile
Expand Up @@ -308,6 +308,14 @@ manually with the application.
* The +test+ environment is used when running automated tests. * The +test+ environment is used when running automated tests.
* The +production+ environment is used when you deploy your application for the world to use. * The +production+ environment is used when you deploy your application for the world to use.


TIP: You don't have to update the database configurations manually. If you look at the
options of the application generator, you will see that one of the options
is named <tt>--database</tt>. This option allows you to choose an adapter from a
list of the most used relational databases. You can even run the generator
repeatedly: <tt>cd .. && rails new blog --database=mysql</tt>. When you confirm the overwriting
of the +config/database.yml+ file, your application will be configured for MySQL
instead of SQLite. Detailed examples of the common database connections are below.

h5. Configuring an SQLite3 Database h5. Configuring an SQLite3 Database


Rails comes with built-in support for "SQLite3":http://www.sqlite.org, which is Rails comes with built-in support for "SQLite3":http://www.sqlite.org, which is
Expand Down Expand Up @@ -411,14 +419,6 @@ development:


Change the username and password in the +development+ section as appropriate. Change the username and password in the +development+ section as appropriate.


TIP: You don't have to update the database configurations manually. If you look at the
options of the application generator, you will see that one of the options
is named <tt>--database</tt>. This option allows you to choose an adapter from a
list of the most used relational databases. You can even run the generator
repeatedly: <tt>cd .. && rails new blog --database=mysql</tt>. When you confirm the overwriting
of the +config/database.yml+ file, your application will be configured for MySQL
instead of SQLite.

h4. Creating the Database h4. Creating the Database


Now that you have your database configured, it's time to have Rails create an Now that you have your database configured, it's time to have Rails create an
Expand Down
2 changes: 1 addition & 1 deletion railties/guides/source/i18n.textile
Expand Up @@ -231,7 +231,7 @@ end


Now, when you call the +books_path+ method you should get +"/en/books"+ (for the default locale). An URL like +http://localhost:3001/nl/books+ should load the Netherlands locale, then, and following calls to +books_path+ should return +"/nl/books"+ (because the locale changed). Now, when you call the +books_path+ method you should get +"/en/books"+ (for the default locale). An URL like +http://localhost:3001/nl/books+ should load the Netherlands locale, then, and following calls to +books_path+ should return +"/nl/books"+ (because the locale changed).


If you don't want to force the use of a locale in your routes you can use an optional path scope (donated by the use brackets) like so: If you don't want to force the use of a locale in your routes you can use an optional path scope (denoted by the parentheses) like so:


<ruby> <ruby>
# config/routes.rb # config/routes.rb
Expand Down
2 changes: 1 addition & 1 deletion railties/guides/source/testing.textile
Expand Up @@ -927,7 +927,7 @@ class UserControllerTest < ActionController::TestCase
assert_difference 'ActionMailer::Base.deliveries.size', +1 do assert_difference 'ActionMailer::Base.deliveries.size', +1 do
post :invite_friend, :email => 'friend@example.com' post :invite_friend, :email => 'friend@example.com'
end end
invite_email = ActionMailer::Base.deliveries.first invite_email = ActionMailer::Base.deliveries.last


assert_equal "You have been invited by me@example.com", invite_email.subject assert_equal "You have been invited by me@example.com", invite_email.subject
assert_equal 'friend@example.com', invite_email.to[0] assert_equal 'friend@example.com', invite_email.to[0]
Expand Down

0 comments on commit 48b580a

Please sign in to comment.