官术网_书友最值得收藏!

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "To use Rails 4.0.0 with Heroku, we need to add the rails_12factor gem to the Gemfile so that we can precompile our assets."

A block of code is set as follows:

    def obscure_string(string, count)
        return string if count.blank?
        substring = string.slice(0..(-1 * count - 1))
        return string.gsub(substring, "*" * substring.length)
    end

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

resources :products do
 collection do
 get 'import'
 end
  resources :variants
end

Commands that need to be entered at the terminal / shell window are set as follows:

gem install rails -v 4.0.0 --no-ri --no-rdoc

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "You should see a Welcome aboard page that lists out some helpful tips as well as information about the application's configuration as shown in the following screenshot:".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 太保市| 阿图什市| 台山市| 吉隆县| 同心县| 海原县| 江安县| 普宁市| 济南市| 呼玛县| 马公市| 永善县| 于田县| 会宁县| 新绛县| 正定县| 津南区| 拉萨市| 措勤县| 公安县| 肥东县| 和林格尔县| 溧阳市| 霍州市| 门源| 汝城县| 永宁县| 诏安县| 武威市| 肇州县| 四子王旗| 西华县| 榆树市| 固始县| 百色市| 湄潭县| 长子县| 永丰县| 奉化市| 北川| 五寨县|