From 1f8ecb85d7c1b3efdf45c3cf3461502b608c1a7c Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Sun, 2 Jan 2011 03:35:38 +0700 Subject: Update CHANGELOGs to include 3.0.3 changes --- activemodel/CHANGELOG | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'activemodel') diff --git a/activemodel/CHANGELOG b/activemodel/CHANGELOG index 9dd5e03685..ea91c97ba2 100644 --- a/activemodel/CHANGELOG +++ b/activemodel/CHANGELOG @@ -3,7 +3,12 @@ * Added ActiveModel::SecurePassword to encapsulate dead-simple password usage with BCrypt encryption and salting [DHH] -*Rails 3.0.2 (unreleased)* +*Rails 3.0.3 (November 16, 2010)* + +* No changes. + + +*Rails 3.0.2 (November 15, 2010)* * No changes -- cgit v1.2.3 From 99424eb0996d41eaccb1b140cc30820fb5779fef Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 2 Jan 2011 00:20:59 +0100 Subject: Revert "Update CHANGELOGs to include 3.0.3 changes" Reason: Sorry, CHANGELOGs can only be edited in master. If you provide a patch I'll apply it myself. Thanks! This reverts commit 1f8ecb85d7c1b3efdf45c3cf3461502b608c1a7c. --- activemodel/CHANGELOG | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'activemodel') diff --git a/activemodel/CHANGELOG b/activemodel/CHANGELOG index ea91c97ba2..9dd5e03685 100644 --- a/activemodel/CHANGELOG +++ b/activemodel/CHANGELOG @@ -3,12 +3,7 @@ * Added ActiveModel::SecurePassword to encapsulate dead-simple password usage with BCrypt encryption and salting [DHH] -*Rails 3.0.3 (November 16, 2010)* - -* No changes. - - -*Rails 3.0.2 (November 15, 2010)* +*Rails 3.0.2 (unreleased)* * No changes -- cgit v1.2.3 From da82b0a746c36ea1274041b0d2401903abf33904 Mon Sep 17 00:00:00 2001 From: brainopia Date: Sat, 15 Jan 2011 03:10:10 +0300 Subject: Remove reference to ActiveRecord from ActiveModel comments --- activemodel/lib/active_model/observing.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb index 0d2dd36e59..bf4fd0740c 100644 --- a/activemodel/lib/active_model/observing.rb +++ b/activemodel/lib/active_model/observing.rb @@ -13,14 +13,18 @@ module ActiveModel # # Activates the observers assigned. Examples: # + # class ORM + # include ActiveModel::Observing + # end + # # # Calls PersonObserver.instance - # ActiveRecord::Base.observers = :person_observer + # ORM.observers = :person_observer # # # Calls Cacher.instance and GarbageCollector.instance - # ActiveRecord::Base.observers = :cacher, :garbage_collector + # ORM.observers = :cacher, :garbage_collector # # # Same as above, just using explicit class references - # ActiveRecord::Base.observers = Cacher, GarbageCollector + # ORM.observers = Cacher, GarbageCollector # # Note: Setting this does not instantiate the observers yet. # +instantiate_observers+ is called during startup, and before -- cgit v1.2.3 From 1a051259b426d624e846f76c3fc6011693603e55 Mon Sep 17 00:00:00 2001 From: Daniel Schierbeck Date: Sat, 15 Jan 2011 17:54:02 +0100 Subject: Properly indent code example block --- .../lib/active_model/mass_assignment_security.rb | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model/mass_assignment_security.rb b/activemodel/lib/active_model/mass_assignment_security.rb index 66cd9fdde6..97e31d4243 100644 --- a/activemodel/lib/active_model/mass_assignment_security.rb +++ b/activemodel/lib/active_model/mass_assignment_security.rb @@ -20,32 +20,32 @@ module ActiveModel # For example, a logged in user may need to assign additional attributes depending # on their role: # - # class AccountsController < ApplicationController - # include ActiveModel::MassAssignmentSecurity + # class AccountsController < ApplicationController + # include ActiveModel::MassAssignmentSecurity # - # attr_accessible :first_name, :last_name + # attr_accessible :first_name, :last_name # - # def self.admin_accessible_attributes - # accessible_attributes + [ :plan_id ] - # end + # def self.admin_accessible_attributes + # accessible_attributes + [ :plan_id ] + # end # - # def update - # ... - # @account.update_attributes(account_params) - # ... - # end + # def update + # ... + # @account.update_attributes(account_params) + # ... + # end # - # protected + # protected # - # def account_params - # sanitize_for_mass_assignment(params[:account]) - # end + # def account_params + # sanitize_for_mass_assignment(params[:account]) + # end # - # def mass_assignment_authorizer - # admin ? admin_accessible_attributes : super - # end + # def mass_assignment_authorizer + # admin ? admin_accessible_attributes : super + # end # - # end + # end # module ClassMethods # Attributes named in this macro are protected from mass-assignment -- cgit v1.2.3