diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-04-12 21:44:11 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-04-12 21:44:11 +0530 |
commit | 8248f4202d67a781bd3da88fc9412bc7264bbb7b (patch) | |
tree | 15af5b14ae2969780fb1ae74b097ab889e10ad86 | |
parent | 6cab7602bb53464f625968d233530f6982841629 (diff) | |
parent | 05ac3921f85663416fe8a4287b05db3284276b24 (diff) | |
download | rails-8248f4202d67a781bd3da88fc9412bc7264bbb7b.tar.gz rails-8248f4202d67a781bd3da88fc9412bc7264bbb7b.tar.bz2 rails-8248f4202d67a781bd3da88fc9412bc7264bbb7b.zip |
Merge branch 'master' of github.com:lifo/docrails
-rw-r--r-- | activemodel/README.rdoc | 6 | ||||
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 2 | ||||
-rw-r--r-- | guides/source/3_2_release_notes.textile | 2 | ||||
-rw-r--r-- | guides/source/security.textile | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml | 3 | ||||
-rw-r--r-- | railties/lib/rails/generators/test_case.rb | 4 |
6 files changed, 11 insertions, 8 deletions
diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 4861b0a002..7d13a0123b 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -14,7 +14,7 @@ Model solves this by defining an explicit API. You can read more about the API in ActiveModel::Lint::Tests. Active Model provides a default module that implements the basic API required -to integrate with Action Pack out of the box: +ActiveModel::Model+. +to integrate with Action Pack out of the box: <tt>ActiveModel::Model</tt>. class Person include ActiveModel::Model @@ -30,7 +30,7 @@ to integrate with Action Pack out of the box: +ActiveModel::Model+. It includes model name introspections, conversions, translations and validations, resulting in a class suitable to be used with Action Pack. -See +ActiveModel::Model+ for more examples. +See <tt>ActiveModel::Model</tt> for more examples. Active Model also provides the following functionality to have ORM-like behavior out of the box: @@ -71,7 +71,7 @@ behavior out of the box: This generates +before_create+, +around_create+ and +after_create+ class methods that wrap your create method. - {Learn more}[link:classes/ActiveModel/CallBacks.html] + {Learn more}[link:classes/ActiveModel/Callbacks.html] * Tracking value changes diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 6e36edee4f..2a569d9a9b 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -187,7 +187,7 @@ module ActiveSupport # Compile around filters with conditions into proxy methods # that contain the conditions. # - # For `around_save :filter_name, :if => :condition': + # For `set_callback :save, :around, :filter_name, :if => :condition': # # def _conditional_callback_save_17 # if condition diff --git a/guides/source/3_2_release_notes.textile b/guides/source/3_2_release_notes.textile index 0f8fea2bf6..3524ea6595 100644 --- a/guides/source/3_2_release_notes.textile +++ b/guides/source/3_2_release_notes.textile @@ -299,7 +299,7 @@ end h5(#actionview_deprecations). Deprecations -* Passing formats or handlers to render :template and friends like <tt>render :template => "foo.html.erb"</tt> is deprecated. Instead, you can provide :handlers and :formats directly as an options: <tt> render :template => "foo", :formats => [:html, :js], :handlers => :erb</tt>. +* Passing formats or handlers to render :template and friends like <tt>render :template => "foo.html.erb"</tt> is deprecated. Instead, you can provide :handlers and :formats directly as options: <tt> render :template => "foo", :formats => [:html, :js], :handlers => :erb</tt>. h4. Sprockets diff --git a/guides/source/security.textile b/guides/source/security.textile index 747a4d6791..c065529cac 100644 --- a/guides/source/security.textile +++ b/guides/source/security.textile @@ -385,7 +385,7 @@ params[:user] # => {:name => “ow3ned”, :admin => true} So if you create a new user using mass-assignment, it may be too easy to become an administrator. -Note that this vulnerability is not restricted to database columns. Any setter method, unless explicitly protected, is accessible via the <tt>attributes=</tt> method. In fact, this vulnerability is extended even further with the introduction of nested mass assignment (and nested object forms) in Rails 2.3<plus>. The +accepts_nested_attributes_for+ declaration provides us the ability to extend mass assignment to model associations (+has_many+, +has_one+, +has_and_belongs_to_many+). For example: +Note that this vulnerability is not restricted to database columns. Any setter method, unless explicitly protected, is accessible via the <tt>attributes=</tt> method. In fact, this vulnerability is extended even further with the introduction of nested mass assignment (and nested object forms) in Rails 2.3. The +accepts_nested_attributes_for+ declaration provides us the ability to extend mass assignment to model associations (+has_many+, +has_one+, +has_and_belongs_to_many+). For example: <ruby> class Person < ActiveRecord::Base diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml index f08f86aac3..467a4e725f 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml +++ b/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml @@ -24,6 +24,9 @@ development: # domain socket that doesn't need configuration. Windows does not have # domain sockets, so uncomment these lines. #host: localhost + + # The TCP port the server listens on. Defaults to 5432. + # If your server runs on a different port number, change accordingly. #port: 5432 # Schema search path. The server defaults to $user,public diff --git a/railties/lib/rails/generators/test_case.rb b/railties/lib/rails/generators/test_case.rb index d81c4c3e1d..2cb34fab7a 100644 --- a/railties/lib/rails/generators/test_case.rb +++ b/railties/lib/rails/generators/test_case.rb @@ -135,7 +135,7 @@ module Rails # Asserts a given migration does not exist. You need to supply an absolute path or a # path relative to the configured destination: # - # assert_no_file "config/random.rb" + # assert_no_migration "db/migrate/create_products.rb" # def assert_no_migration(relative) file_name = migration_file_name(relative) @@ -182,7 +182,7 @@ module Rails # Asserts the given attribute type gets a proper default value: # - # assert_field_type :string, "MyString" + # assert_field_default_value :string, "MyString" # def assert_field_default_value(attribute_type, value) assert_equal(value, create_generated_attribute(attribute_type).default) |