diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2015-02-21 18:51:55 +0100 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2015-02-21 18:52:47 +0100 |
commit | bab3c7c63deee86305d80e24c4ea1124c0ec27d1 (patch) | |
tree | 907dffc48e8931e8221ead88d41b61bbed86ca78 /guides/source | |
parent | 531cf056422a3838cf67df54d238336bd2b79287 (diff) | |
download | rails-bab3c7c63deee86305d80e24c4ea1124c0ec27d1.tar.gz rails-bab3c7c63deee86305d80e24c4ea1124c0ec27d1.tar.bz2 rails-bab3c7c63deee86305d80e24c4ea1124c0ec27d1.zip |
Minor guides edits [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/configuring.md | 16 | ||||
-rw-r--r-- | guides/source/debugging_rails_applications.md | 31 |
2 files changed, 23 insertions, 24 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 994cc31cff..ab1cc9306f 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -1053,17 +1053,19 @@ These configuration points are then available through the configuration object: Search Engines Indexing ----------------------- -Sometimes, you may want to prevent some pages of your application be visible on search sites like Google, -Bing, Yahoo or Duck Duck Go. The robots that index these sites will first analyse the -`https://your-site.com/robots.txt` file to know what pages it is allowed to index. +Sometimes, you may want to prevent some pages of your application to be visible +on search sites like Google, Bing, Yahoo or Duck Duck Go. The robots that index +these sites will first analyse the `http://your-site.com/robots.txt` file to +know which pages it is allowed to index. -Rails creates this file for you on `/public` folder. By default, it allows search engines to index all -pages of your application. If you want to block indexing on all pages of you application, use this: +Rails creates this file for you inside the `/public` folder. By default, it allows +search engines to index all pages of your application. If you want to block +indexing on all pages of you application, use this: ``` User-agent: * Disallow: / ``` -To block just specific pages, it's necessary to use a more complex syntax. Learn it on the -[official documentation](http://www.robotstxt.org/robotstxt.html). +To block just specific pages, it's necessary to use a more complex syntax. Learn +it on the [official documentation](http://www.robotstxt.org/robotstxt.html). diff --git a/guides/source/debugging_rails_applications.md b/guides/source/debugging_rails_applications.md index 6113a61f4c..926a048762 100644 --- a/guides/source/debugging_rails_applications.md +++ b/guides/source/debugging_rails_applications.md @@ -246,9 +246,9 @@ noticeable with large amounts of logging, but it's a good practice to employ. Debugging with the `web-console` gem ------------------------------------- -The web console allows you to create an interactive ruby session in your browser. An interactive -console is launched automatically in case on an error but can also be launched for debugging purposes -by invoking `console` in a view or controller. +The web console allows you to start an interactive Ruby session in your browser. +An interactive console is launched automatically in case of an error but can also +be launched for debugging purposes by invoking `console` in a view or controller. For example in a view: @@ -268,30 +268,27 @@ class PostsController < ApplicationController end end ``` -###config.web_console.whitelisted_ips -By default the web console can only be accessed from localhost. `config.web_console.whitelisted_ips` -lets you control which IPs have access to the console. +### config.web_console.whitelisted_ips -For example, to allow access from both localhost and 192.168.0.100: +By default the web console can only be accessed from localhost. +`config.web_console.whitelisted_ips` lets you control which IPs have access to +the console. + +For example, to allow access from both localhost and 192.168.0.100, you can put +inside your configuration file: ```ruby -# config/application.rb -class Application < Rails::Application - config.web_console.whitelisted_ips = %w( 127.0.0.1 192.168.0.100 ) -end +config.web_console.whitelisted_ips = %w( 127.0.0.1 192.168.0.100 ) ``` -To allow access from an entire network: +Or to allow access from an entire network: ```ruby -# config/application.rb -class Application < Rails::Application - config.web_console.whitelisted_ips = %w( 127.0.0.1 192.168.0.0/16 ) -end +config.web_console.whitelisted_ips = %w( 127.0.0.1 192.168.0.0/16 ) ``` -Web console is a powerful tool so be careful who you open access to. +The web console is a powerful tool so be careful when you give access to an IP. Debugging with the `byebug` gem |