adds to the API guidelines the proper spelling of Arel

This commit is contained in:
Xavier Noria 2010-09-19 00:04:30 +02:00
parent 2d65ff5af7
commit 2b6c2e947b
3 changed files with 4 additions and 4 deletions

View File

@ -260,8 +260,8 @@ module ActiveRecord
def build_select(arel, selects) def build_select(arel, selects)
unless selects.empty? unless selects.empty?
@implicit_readonly = false @implicit_readonly = false
# TODO: fix this ugly hack, we should refactor the callers to get an ARel compatible array. # TODO: fix this ugly hack, we should refactor the callers to get an Arel compatible array.
# Before this change we were passing to ARel the last element only, and ARel is capable of handling an array # Before this change we were passing to Arel the last element only, and Arel is capable of handling an array
case select = selects.last case select = selects.last
when Arel::Expression, Arel::SqlLiteral when Arel::Expression, Arel::SqlLiteral
arel.project(select) arel.project(select)

View File

@ -29,7 +29,7 @@ Documentation has to be concise but comprehensive. Explore and document edge cas
The proper names of Rails components have a space in between the words, like "Active Support". +ActiveRecord+ is a Ruby module, whereas Active Record is an ORM. Historically there has been lack of consistency regarding this, but we checked with David when docrails started. All Rails documentation consistently refer to Rails components by their proper name, and if in your next blog post or presentation you remember this tidbit and take it into account that'd be fenomenal :). The proper names of Rails components have a space in between the words, like "Active Support". +ActiveRecord+ is a Ruby module, whereas Active Record is an ORM. Historically there has been lack of consistency regarding this, but we checked with David when docrails started. All Rails documentation consistently refer to Rails components by their proper name, and if in your next blog post or presentation you remember this tidbit and take it into account that'd be fenomenal :).
Spell names correctly: HTML, MySQL, JavaScript, ERb. Use the article "an" for "SQL", as in "an SQL statement". Also "an SQLite database". Spell names correctly: Arel, HTML, MySQL, JavaScript, ERb. Use the article "an" for "SQL", as in "an SQL statement". Also "an SQLite database".
h3. Example Code h3. Example Code

View File

@ -848,7 +848,7 @@ h5. +require "active_record"+
TODO: Why are +activesupport_path+ and +activemodel_path+ defined here? TODO: Why are +activesupport_path+ and +activemodel_path+ defined here?
The first three requires require ActiveSupport, Active Model and ARel in that order: The first three requires require ActiveSupport, Active Model and Arel in that order:
<ruby> <ruby>
require 'active_support' require 'active_support'