1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge branch 'master' of github.com:rails/docrails

This commit is contained in:
Vijay Dev 2014-06-01 11:46:37 +00:00
commit 4ae90a7dd8
4 changed files with 11 additions and 6 deletions

View file

@ -19,9 +19,9 @@ A short rundown of some of the major features:
class Product < ActiveRecord::Base
end
{Learn more}[link:classes/ActiveRecord/Base.html]
The Product class is automatically mapped to the table named "products",
which might look like this:
@ -33,7 +33,7 @@ which might look like this:
This would also define the following accessors: `Product#name` and
`Product#name=(new_name)`.
* Associations between objects defined by simple class methods.

View file

@ -13,9 +13,9 @@ module ActiveRecord
# exception is raised.
#
# cat = Cat.new(name: "Gorby", status: "yawning")
# cat.attributes # => { "name" => "Gorby", "status" => "yawning" }
# cat.attributes # => { "name" => "Gorby", "status" => "yawning", "created_at" => nil, "updated_at" => nil}
# cat.assign_attributes(status: "sleeping")
# cat.attributes # => { "name" => "Gorby", "status" => "sleeping" }
# cat.attributes # => { "name" => "Gorby", "status" => "sleeping", "created_at" => nil, "updated_at" => nil }
#
# New attributes will be persisted in the database when the object is saved.
#

View file

@ -562,4 +562,4 @@ Credits
See the [full list of contributors to Rails](http://contributors.rubyonrails.org/) for the many people who spent many hours making Rails, the stable and robust framework it is. Kudos to all of them.
Rails 3.2 Release Notes were compiled by [Vijay Dev](https://github.com/vijaydev.)
Rails 3.2 Release Notes were compiled by [Vijay Dev](https://github.com/vijaydev).

View file

@ -161,6 +161,11 @@ module Rails
end
end
# Returns an array of generator namespaces that are hidden.
# Generator namespaces may be hidden for a variety of reasons.
# Some are aliased such as "rails:migration" and can be
# invoked with the shorter "migration", others are private to other generators
# such as "css:scaffold".
def self.hidden_namespaces
@hidden_namespaces ||= begin
orm = options[:rails][:orm]