提交 d38b4771 编写于 作者: L logylaps 提交者: Xavier Noria

typo 'main.cs' -> 'main.css', and textile typo 'h6(:has_many-group)' ->...

typo 'main.cs' -> 'main.css', and textile typo 'h6(:has_many-group)' -> 'h6(#has_many-group)', and typo. missing 'if'
上级 c8d03fbe
......@@ -802,7 +802,7 @@ will either assign an existing client object with the name "Ryan" to the client
h3. Finding by SQL
If you'd like to use your own SQL to find records in a table you can use +find_by_sql+. The +find_by_sql+ method will return an array of objects even the underlying query returns just a single record. For example you could run this query:
If you'd like to use your own SQL to find records in a table you can use +find_by_sql+. The +find_by_sql+ method will return an array of objects even if the underlying query returns just a single record. For example you could run this query:
<ruby>
Client.find_by_sql("SELECT * FROM clients
......
......@@ -1262,7 +1262,7 @@ end
TIP: In any case, Rails will not create foreign key columns for you. You need to explicitly define them as part of your migrations.
h6(:has_many-group). +:group+
h6(#has_many-group). +:group+
The +:group+ option supplies an attribute name to group the result set by, using a +GROUP BY+ clause in the finder SQL.
......
......@@ -747,7 +747,7 @@ You can even use dynamic paths such as +cache/#{current_site}/main/display+.
h5. Linking to CSS Files with +stylesheet_link_tag+
The +stylesheet_link_tag+ helper returns an HTML +&lt;link&gt;+ tag for each source provided. Rails looks in +public/stylesheets+ for these files by default, but you can specify a full path relative to the document root, or a URL, if you prefer. For example, to include +public/stylesheets/main.cs+:
The +stylesheet_link_tag+ helper returns an HTML +&lt;link&gt;+ tag for each source provided. Rails looks in +public/stylesheets+ for these files by default, but you can specify a full path relative to the document root, or a URL, if you prefer. For example, to include +public/stylesheets/main.css+:
<erb>
<%= stylesheet_link_tag "main" %>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册