# 代码规范

对于编程的代码规范，我们都遵循国际习惯，做到规范统一，每个程序员都能看懂他人的代码。

* [HTML & CSS](https://google.github.io/styleguide/htmlcssguide.html)
* [Javascript](https://github.com/airbnb/javascript)
* [Ruby](https://github.com/JuanitoFatas/ruby-style-guide/blob/master/README-zhCN.md)
  * 使用Ruby 2.3+
  * 使用`dig`方法深度获取Hash的值
    * `params[:search][:keywords]` 不推荐
    * `params.dig(:search, :keywords)` 推荐
* [Ruby On Rails](https://github.com/JuanitoFatas/rails-style-guide/blob/master/README-zhCN.md)
  * Assets资源引用途径的优先级：[RubyGems](https://rubygems.org/gems/bootstrap) > [RailsAssets](https://rails-assets.org/#/components/bootstrap) > [NPM](https://www.npmjs.com/package/bootstrap) > Download


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.tanmer.cn/dai-ma-gui-fan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
