From 544a10e428cda02e7baa38586ef266daaef20d89 Mon Sep 17 00:00:00 2001 From: Mike Manewitz Date: Fri, 4 May 2012 10:24:56 -0500 Subject: Editing log levels to reflect this doc: http://api.rubyonrails.org/classes/ActiveSupport/BufferedLogger/Severity.html --- guides/source/debugging_rails_applications.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/debugging_rails_applications.textile b/guides/source/debugging_rails_applications.textile index 903ed59e7b..45fa4ada78 100644 --- a/guides/source/debugging_rails_applications.textile +++ b/guides/source/debugging_rails_applications.textile @@ -124,7 +124,7 @@ h4. Log Levels When something is logged it's printed into the corresponding log if the log level of the message is equal or higher than the configured log level. If you want to know the current log level you can call the +Rails.logger.level+ method. -The available log levels are: +:debug+, +:info+, +:warn+, +:error+, and +:fatal+, corresponding to the log level numbers from 0 up to 4 respectively. To change the default log level, use +The available log levels are: +:debug+, +:info+, +:warn+, +:error+, +:fatal+, and +:unknown+, corresponding to the log level numbers from 0 up to 5 respectively. To change the default log level, use config.log_level = :warn # In any environment initializer, or -- cgit v1.2.3 From 7f536f9158588b66c0e5a6aa8772b919812f9cb9 Mon Sep 17 00:00:00 2001 From: Kristian Freeman Date: Fri, 4 May 2012 09:56:07 -0700 Subject: Play nice with some lint patterns --- guides/assets/stylesheets/main.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guides/assets/stylesheets/main.css b/guides/assets/stylesheets/main.css index 42b85fefa3..60859a6930 100644 --- a/guides/assets/stylesheets/main.css +++ b/guides/assets/stylesheets/main.css @@ -196,11 +196,12 @@ a, a:link, a:visited { width: 27em; display: block; background: #980905; - border-radius: 1em; -webkit-border-radius: 1em; -moz-border-radius: 1em; + border-radius: 1em; -webkit-box-shadow: 0.25em 0.25em 1em rgba(0,0,0,0.25); -moz-box-shadow: rgba(0,0,0,0.25) 0.25em 0.25em 1em; + box-shadow: 0.25em 0.25em 1em rgba(0,0,0,0.25); color: #f1938c; padding: 1.5em 2em; position: absolute; @@ -447,8 +448,8 @@ div.important p, div.caution p, div.warning p, div.note p, div.info p { #edge-badge { position: fixed; - right: 0px; - top: 0px; + right: 0; + top: 0; z-index: 100; border: none; } -- cgit v1.2.3 From c8e057198796f1052f2e3e185f0c777292e75394 Mon Sep 17 00:00:00 2001 From: Ernesto Tagwerker Date: Fri, 4 May 2012 14:35:16 -0300 Subject: Added reference to I18n.localize, as discussed here: https://github.com/rails/rails/issues/4027 --- actionpack/lib/action_view/helpers/translation_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb index fd06bfa2a8..8171bea8ed 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionpack/lib/action_view/helpers/translation_helper.rb @@ -63,6 +63,9 @@ module ActionView alias :t :translate # Delegates to I18n.localize with no additional functionality. + # + # See http://rubydoc.info/github/svenfuchs/i18n/master/I18n/Backend/Base:localize + # for more information. def localize(*args) I18n.localize(*args) end -- cgit v1.2.3 From b7e3f3c7c40e31572d941cb29fe03fd8d95e3985 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sun, 6 May 2012 00:46:16 +0530 Subject: Revert "Play nice with some lint patterns" This reverts commit 7f536f9158588b66c0e5a6aa8772b919812f9cb9. Reason: If at all this is done, this should be done in rails master. --- guides/assets/stylesheets/main.css | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/guides/assets/stylesheets/main.css b/guides/assets/stylesheets/main.css index 60859a6930..42b85fefa3 100644 --- a/guides/assets/stylesheets/main.css +++ b/guides/assets/stylesheets/main.css @@ -196,12 +196,11 @@ a, a:link, a:visited { width: 27em; display: block; background: #980905; + border-radius: 1em; -webkit-border-radius: 1em; -moz-border-radius: 1em; - border-radius: 1em; -webkit-box-shadow: 0.25em 0.25em 1em rgba(0,0,0,0.25); -moz-box-shadow: rgba(0,0,0,0.25) 0.25em 0.25em 1em; - box-shadow: 0.25em 0.25em 1em rgba(0,0,0,0.25); color: #f1938c; padding: 1.5em 2em; position: absolute; @@ -448,8 +447,8 @@ div.important p, div.caution p, div.warning p, div.note p, div.info p { #edge-badge { position: fixed; - right: 0; - top: 0; + right: 0px; + top: 0px; z-index: 100; border: none; } -- cgit v1.2.3 From f9646c8a6312e8d2d5ecc5d35e6201a7f4fe00ba Mon Sep 17 00:00:00 2001 From: Mitch Crowe Date: Sat, 5 May 2012 18:34:54 -0700 Subject: SpawnMethods#merge returns the intersection when passed an array, and not the union. Update the documentation to reflect this. --- activerecord/lib/active_record/relation/spawn_methods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index 41e55dfd0e..f6d178db7a 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -7,7 +7,7 @@ module ActiveRecord module SpawnMethods # Merges in the conditions from other, if other is an ActiveRecord::Relation. - # Returns an array representing the union of the resulting records with other, if other is an array. + # Returns an array representing the intersection of the resulting records with other, if other is an array. # # ==== Examples # @@ -16,7 +16,7 @@ module ActiveRecord # # recent_posts = Post.order('created_at DESC').first(5) # Post.where(:published => true).merge(recent_posts) - # # Returns the union of all published posts with the 5 most recently created posts. + # # Returns the intersection of all published posts with the 5 most recently created posts. # # (This is just an example. You'd probably want to do this with a single query!) # def merge(other) -- cgit v1.2.3 From 9b854ccd77498e5c0f30912596737f0b8efa4654 Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Sun, 6 May 2012 21:04:02 +1000 Subject: Add missing public method doc to TimeWithZone.name --- activesupport/lib/active_support/time_with_zone.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 1cb71012ef..9d89e425fc 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -35,8 +35,10 @@ module ActiveSupport # t.is_a?(ActiveSupport::TimeWithZone) # => true # class TimeWithZone + + # Report class name as 'Time' to thwart type checking def self.name - 'Time' # Report class name as 'Time' to thwart type checking + 'Time' end include Comparable -- cgit v1.2.3 From 552f535796b92df57ae7e7ea339307c45683c71b Mon Sep 17 00:00:00 2001 From: Mark Rushakoff Date: Sun, 6 May 2012 20:40:48 -0700 Subject: are ran -> are run The former is grammatically incorrect. --- guides/source/configuring.textile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/guides/source/configuring.textile b/guides/source/configuring.textile index 59f12e98ab..5bfb45f778 100644 --- a/guides/source/configuring.textile +++ b/guides/source/configuring.textile @@ -182,13 +182,13 @@ The full set of methods that can be used in this block are as follows: * +force_plural+ allows pluralized model names. Defaults to +false+. * +helper+ defines whether or not to generate helpers. Defaults to +true+. * +integration_tool+ defines which integration tool to use. Defaults to +nil+. -* +javascripts+ turns on the hook for javascripts in generators. Used in Rails for when the +scaffold+ generator is ran. Defaults to +true+. +* +javascripts+ turns on the hook for javascripts in generators. Used in Rails for when the +scaffold+ generator is run. Defaults to +true+. * +javascript_engine+ configures the engine to be used (for eg. coffee) when generating assets. Defaults to +nil+. * +orm+ defines which orm to use. Defaults to +false+ and will use Active Record by default. * +performance_tool+ defines which performance tool to use. Defaults to +nil+. * +resource_controller+ defines which generator to use for generating a controller when using +rails generate resource+. Defaults to +:controller+. * +scaffold_controller+ different from +resource_controller+, defines which generator to use for generating a _scaffolded_ controller when using +rails generate scaffold+. Defaults to +:scaffold_controller+. -* +stylesheets+ turns on the hook for stylesheets in generators. Used in Rails for when the +scaffold+ generator is ran, but this hook can be used in other generates as well. Defaults to +true+. +* +stylesheets+ turns on the hook for stylesheets in generators. Used in Rails for when the +scaffold+ generator is run, but this hook can be used in other generates as well. Defaults to +true+. * +stylesheet_engine+ configures the stylesheet engine (for eg. sass) to be used when generating assets. Defaults to +:css+. * +test_framework+ defines which test framework to use. Defaults to +false+ and will use Test::Unit by default. * +template_engine+ defines which template engine to use, such as ERB or Haml. Defaults to +:erb+. @@ -585,13 +585,13 @@ TIP: If you have any ordering dependency in your initializers, you can control t h3. Initialization events -Rails has 5 initialization events which can be hooked into (listed in the order that they are ran): +Rails has 5 initialization events which can be hooked into (listed in the order that they are run): * +before_configuration+: This is run as soon as the application constant inherits from +Rails::Application+. The +config+ calls are evaluated before this happens. * +before_initialize+: This is run directly before the initialization process of the application occurs with the +:bootstrap_hook+ initializer near the beginning of the Rails initialization process. -* +to_prepare+: Run after the initializers are ran for all Railties (including the application itself), but before eager loading and the middleware stack is built. More importantly, will run upon every request in +development+, but only once (during boot-up) in +production+ and +test+. +* +to_prepare+: Run after the initializers are run for all Railties (including the application itself), but before eager loading and the middleware stack is built. More importantly, will run upon every request in +development+, but only once (during boot-up) in +production+ and +test+. * +before_eager_load+: This is run directly before eager loading occurs, which is the default behaviour for the _production_ environment and not for the +development+ environment. @@ -732,7 +732,7 @@ The error occurred while evaluating nil.each *+load_config_initializers+* Loads all Ruby files from +config/initializers+ in the application, railties and engines. The files in this directory can be used to hold configuration settings that should be made after all of the frameworks are loaded. -*+engines_blank_point+* Provides a point-in-initialization to hook into if you wish to do anything before engines are loaded. After this point, all railtie and engine initializers are ran. +*+engines_blank_point+* Provides a point-in-initialization to hook into if you wish to do anything before engines are loaded. After this point, all railtie and engine initializers are run. *+add_generator_templates+* Finds templates for generators at +lib/templates+ for the application, railities and engines and adds these to the +config.generators.templates+ setting, which will make the templates available for all generators to reference. -- cgit v1.2.3 From 9f3637fad5bb68b13a6d004694ba8d2b5e6b8d9d Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 00:33:26 -0500 Subject: adding observer example --- activemodel/README.rdoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 1fd75141f8..0c7089598c 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -135,6 +135,16 @@ behavior out of the box: pattern in a Rails App and take advantage of all the standard observer functions. + class PersonObserver < ActiveModel::Observer + def after_create(person) + person.logger.info("New person added!") + end + + def after_destroy(person) + person.logger.warn("Person with an id of #{person.id} was destroyed!") + end + end + {Learn more}[link:classes/ActiveModel/Observer.html] * Making objects serializable -- cgit v1.2.3 From c962680e1902d2c9474f0be8ba7b0b8ab361cae6 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 00:40:00 -0500 Subject: fixing active model links in readme --- activemodel/README.rdoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 0c7089598c..1485709991 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -53,7 +53,7 @@ behavior out of the box: person.clear_name person.clear_age - {Learn more}[link:classes/ActiveModel/AttributeMethods.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/AttributeMethods.html] * Callbacks for certain operations @@ -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}[http://api.rubyonrails.org/classes/ActiveModel/Callbacks.html] * Tracking value changes @@ -88,7 +88,7 @@ behavior out of the box: person.save person.previous_changes # => {'name' => ['bob, 'robert']} - {Learn more}[link:classes/ActiveModel/Dirty.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Dirty.html] * Adding +errors+ interface to objects @@ -116,7 +116,7 @@ behavior out of the box: person.errors.full_messages # => ["Name can not be nil"] - {Learn more}[link:classes/ActiveModel/Errors.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Errors.html] * Model name introspection @@ -127,7 +127,7 @@ behavior out of the box: NamedPerson.model_name # => "NamedPerson" NamedPerson.model_name.human # => "Named person" - {Learn more}[link:classes/ActiveModel/Naming.html] + {Learn more}[http://api.rubyonrails.org/ActiveModel/Naming.html] * Observer support @@ -145,7 +145,7 @@ behavior out of the box: end end - {Learn more}[link:classes/ActiveModel/Observer.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Observer.html] * Making objects serializable @@ -157,7 +157,7 @@ behavior out of the box: s.to_json # => "{\"name\":null}" s.to_xml # => "\n "My attribute" - {Learn more}[link:classes/ActiveModel/Translation.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Translation.html] * Validation support @@ -186,7 +186,7 @@ behavior out of the box: person.first_name = 'zoolander' person.valid? # => false - {Learn more}[link:classes/ActiveModel/Validations.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Validations.html] * Custom validators @@ -208,7 +208,7 @@ behavior out of the box: p.name = "Bob" p.valid? # => true - {Learn more}[link:classes/ActiveModel/Validator.html] + {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Validator.html] == Download and installation -- cgit v1.2.3 From 79f1daf2cef87c706cdaa98398de3e5cf401e839 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 00:45:54 -0500 Subject: marking some active model classes --- activemodel/README.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 1485709991..b8c7846c1d 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -75,7 +75,7 @@ behavior out of the box: * Tracking value changes - The ActiveModel::Dirty module allows for tracking attribute changes: + The +ActiveModel::Dirty+ module allows for tracking attribute changes: person = Person.new person.name # => nil @@ -131,7 +131,7 @@ behavior out of the box: * Observer support - ActiveModel::Observers allows your object to implement the Observer + +ActiveModel::Observers+ allows your object to implement the Observer pattern in a Rails App and take advantage of all the standard observer functions. @@ -149,7 +149,7 @@ behavior out of the box: * Making objects serializable - ActiveModel::Serialization provides a standard interface for your object + +ActiveModel::Serialization+ provides a standard interface for your object to provide +to_json+ or +to_xml+ serialization. s = SerialPerson.new -- cgit v1.2.3 From 204a79fe61051dac19ac854f22f22ca4288162b8 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 00:48:19 -0500 Subject: fixing marked actived model classes in readme --- activemodel/README.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index b8c7846c1d..df9ca93051 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -75,7 +75,7 @@ behavior out of the box: * Tracking value changes - The +ActiveModel::Dirty+ module allows for tracking attribute changes: + The ActiveModel::Dirty module allows for tracking attribute changes: person = Person.new person.name # => nil @@ -131,7 +131,7 @@ behavior out of the box: * Observer support - +ActiveModel::Observers+ allows your object to implement the Observer + ActiveModel::Observers allows your object to implement the Observer pattern in a Rails App and take advantage of all the standard observer functions. @@ -149,7 +149,7 @@ behavior out of the box: * Making objects serializable - +ActiveModel::Serialization+ provides a standard interface for your object + ActiveModel::Serialization provides a standard interface for your object to provide +to_json+ or +to_xml+ serialization. s = SerialPerson.new -- cgit v1.2.3 From 8c4777f446d9e14deb077f44d31579a5a96e68ae Mon Sep 17 00:00:00 2001 From: "Mark J. Titorenko" Date: Mon, 7 May 2012 12:04:51 +0100 Subject: Added documentation for +beginning_of_hour+ and +end_of_hour+ to Active Support Core Extensions guide. --- .../source/active_support_core_extensions.textile | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/guides/source/active_support_core_extensions.textile b/guides/source/active_support_core_extensions.textile index e4a6e145b9..a238a84e8c 100644 --- a/guides/source/active_support_core_extensions.textile +++ b/guides/source/active_support_core_extensions.textile @@ -3064,6 +3064,28 @@ date.end_of_day # => Sun Jun 06 23:59:59 +0200 2010 +beginning_of_day+ is aliased to +at_beginning_of_day+, +midnight+, +at_midnight+. +h6. +beginning_of_hour+, +end_of_hour+ + +The method +beginning_of_hour+ returns a timestamp at the beginning of the hour (hh:00:00): + + +date = DateTime.new(2010, 6, 7, 19, 55, 25) +date.beginning_of_hour # => Mon Jun 07 19:00:00 +0200 2010 + + +The method +end_of_hour+ returns a timestamp at the end of the hour (hh:59:59): + + +date = DateTime.new(2010, 6, 7, 19, 55, 25) +date.end_of_hour # => Mon Jun 07 19:59:59 +0200 2010 + + ++beginning_of_hour+ is aliased to +at_beginning_of_hour+. + +INFO: +beginning_of_hour+ and +end_of_hour+ are implemented for +Time+ and +DateTime+ but *not* +Date+ as it does not make sense to request the beginning or end of an hour on a +Date+ instance. + +NOTE: All the following methods are defined in +active_support/core_ext/date/calculations.rb+. + h6. +ago+, +since+ The method +ago+ receives a number of seconds as argument and returns a timestamp those many seconds ago from midnight: @@ -3131,6 +3153,13 @@ since (in) On the other hand, +advance+ and +change+ are also defined and support more options, they are documented below. +The following methods are only implemented in +active_support/core_ext/date_time/calculations.rb+ as they only make sense when used with a +DateTime+ instance: + + +beginning_of_hour (at_beginning_of_hour) +end_of_hour + + h5. Named Datetimes h6. +DateTime.current+ @@ -3273,6 +3302,8 @@ ago since (in) beginning_of_day (midnight, at_midnight, at_beginning_of_day) end_of_day +beginning_of_hour (at_beginning_of_hour) +end_of_hour beginning_of_week (at_beginning_of_week) end_of_week (at_end_of_week) monday -- cgit v1.2.3 From f174e8dcef66446cb7483c48dc746887b29078b6 Mon Sep 17 00:00:00 2001 From: "Mark J. Titorenko" Date: Mon, 7 May 2012 12:07:35 +0100 Subject: Corrections to +beginning_of_day+ and +end_of_day+ example dates. --- guides/source/active_support_core_extensions.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/source/active_support_core_extensions.textile b/guides/source/active_support_core_extensions.textile index a238a84e8c..c9e9a13c09 100644 --- a/guides/source/active_support_core_extensions.textile +++ b/guides/source/active_support_core_extensions.textile @@ -3052,14 +3052,14 @@ The method +beginning_of_day+ returns a timestamp at the beginning of the day (0 date = Date.new(2010, 6, 7) -date.beginning_of_day # => Sun Jun 07 00:00:00 +0200 2010 +date.beginning_of_day # => Mon Jun 07 00:00:00 +0200 2010 The method +end_of_day+ returns a timestamp at the end of the day (23:59:59): date = Date.new(2010, 6, 7) -date.end_of_day # => Sun Jun 06 23:59:59 +0200 2010 +date.end_of_day # => Mon Jun 07 23:59:59 +0200 2010 +beginning_of_day+ is aliased to +at_beginning_of_day+, +midnight+, +at_midnight+. -- cgit v1.2.3 From 61587b18d2b4b03041cc7e54da00cff6344abeec Mon Sep 17 00:00:00 2001 From: "Mark J. Titorenko" Date: Mon, 7 May 2012 12:24:40 +0100 Subject: Remove accidentally pasted NOTE section during introduction of +beginning_of_hour+ and +end_of_hour+ documentation. --- guides/source/active_support_core_extensions.textile | 2 -- 1 file changed, 2 deletions(-) diff --git a/guides/source/active_support_core_extensions.textile b/guides/source/active_support_core_extensions.textile index c9e9a13c09..43dc0c12cf 100644 --- a/guides/source/active_support_core_extensions.textile +++ b/guides/source/active_support_core_extensions.textile @@ -3084,8 +3084,6 @@ date.end_of_hour # => Mon Jun 07 19:59:59 +0200 2010 INFO: +beginning_of_hour+ and +end_of_hour+ are implemented for +Time+ and +DateTime+ but *not* +Date+ as it does not make sense to request the beginning or end of an hour on a +Date+ instance. -NOTE: All the following methods are defined in +active_support/core_ext/date/calculations.rb+. - h6. +ago+, +since+ The method +ago+ receives a number of seconds as argument and returns a timestamp those many seconds ago from midnight: -- cgit v1.2.3 From 89fff791fa55da09d39b09c7a5e5afe066f79f85 Mon Sep 17 00:00:00 2001 From: Rob Zolkos Date: Mon, 7 May 2012 21:43:05 +1000 Subject: Doc for ActiveRecord::Result empty? method --- activerecord/lib/active_record/result.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/activerecord/lib/active_record/result.rb b/activerecord/lib/active_record/result.rb index fb4b89b87b..fd276ccf5d 100644 --- a/activerecord/lib/active_record/result.rb +++ b/activerecord/lib/active_record/result.rb @@ -28,6 +28,7 @@ module ActiveRecord alias :map! :map alias :collect! :map + # Returns true if there are no records. def empty? rows.empty? end -- cgit v1.2.3 From bc06e8d706fd8818d434c66f46d2e889ca24bd2d Mon Sep 17 00:00:00 2001 From: Ayrton De Craene Date: Mon, 7 May 2012 15:40:08 +0200 Subject: Compressed all images from the guide through ImageOptim which saves sometimes up to 74.6% in size [ci skip] --- guides/assets/images/belongs_to.png | Bin 34017 -> 26076 bytes guides/assets/images/book_icon.gif | Bin 337 -> 329 bytes guides/assets/images/challenge.png | Bin 54134 -> 33373 bytes guides/assets/images/chapters_icon.gif | Bin 628 -> 620 bytes guides/assets/images/check_bullet.gif | Bin 384 -> 376 bytes guides/assets/images/credits_pic_blank.gif | Bin 613 -> 597 bytes guides/assets/images/csrf.png | Bin 41996 -> 32179 bytes guides/assets/images/customized_error_messages.png | Bin 5055 -> 2561 bytes guides/assets/images/edge_badge.png | Bin 7945 -> 5964 bytes guides/assets/images/error_messages.png | Bin 14645 -> 10964 bytes guides/assets/images/feature_tile.gif | Bin 43 -> 35 bytes guides/assets/images/footer_tile.gif | Bin 44 -> 36 bytes guides/assets/images/fxn.png | Bin 20664 -> 15434 bytes .../images/getting_started/confirm_dialog.png | Bin 36070 -> 29542 bytes .../images/getting_started/form_with_errors.png | Bin 20820 -> 14031 bytes .../index_action_with_edit_link.png | Bin 15547 -> 9772 bytes guides/assets/images/getting_started/new_post.png | Bin 14334 -> 5888 bytes .../images/getting_started/post_with_comments.png | Bin 31630 -> 18496 bytes .../routing_error_no_controller.png | Bin 15744 -> 6268 bytes .../routing_error_no_route_matches.png | Bin 16065 -> 6508 bytes .../getting_started/show_action_for_posts.png | Bin 6885 -> 2991 bytes .../template_is_missing_posts_new.png | Bin 15168 -> 5851 bytes .../getting_started/undefined_method_post_path.png | Bin 15254 -> 9217 bytes .../unknown_action_create_for_posts.png | Bin 12652 -> 4146 bytes .../unknown_action_new_for_posts.png | Bin 12756 -> 4208 bytes guides/assets/images/grey_bullet.gif | Bin 45 -> 37 bytes guides/assets/images/habtm.png | Bin 63801 -> 49325 bytes guides/assets/images/has_many.png | Bin 38582 -> 28988 bytes guides/assets/images/has_many_through.png | Bin 100220 -> 79428 bytes guides/assets/images/has_one.png | Bin 39022 -> 29072 bytes guides/assets/images/has_one_through.png | Bin 92594 -> 72434 bytes guides/assets/images/header_backdrop.png | Bin 882 -> 224 bytes guides/assets/images/header_tile.gif | Bin 44 -> 36 bytes guides/assets/images/i18n/demo_html_safe.png | Bin 11946 -> 10073 bytes .../assets/images/i18n/demo_localized_pirate.png | Bin 15027 -> 11485 bytes guides/assets/images/i18n/demo_translated_en.png | Bin 12057 -> 9325 bytes .../assets/images/i18n/demo_translated_pirate.png | Bin 13392 -> 10202 bytes .../images/i18n/demo_translation_missing.png | Bin 13143 -> 10260 bytes guides/assets/images/i18n/demo_untranslated.png | Bin 11925 -> 9224 bytes guides/assets/images/icons/callouts/1.png | Bin 329 -> 147 bytes guides/assets/images/icons/callouts/10.png | Bin 361 -> 183 bytes guides/assets/images/icons/callouts/11.png | Bin 565 -> 290 bytes guides/assets/images/icons/callouts/12.png | Bin 617 -> 322 bytes guides/assets/images/icons/callouts/13.png | Bin 623 -> 328 bytes guides/assets/images/icons/callouts/14.png | Bin 411 -> 246 bytes guides/assets/images/icons/callouts/15.png | Bin 640 -> 340 bytes guides/assets/images/icons/callouts/2.png | Bin 353 -> 168 bytes guides/assets/images/icons/callouts/3.png | Bin 350 -> 170 bytes guides/assets/images/icons/callouts/4.png | Bin 345 -> 165 bytes guides/assets/images/icons/callouts/5.png | Bin 348 -> 169 bytes guides/assets/images/icons/callouts/6.png | Bin 355 -> 176 bytes guides/assets/images/icons/callouts/7.png | Bin 344 -> 160 bytes guides/assets/images/icons/callouts/8.png | Bin 357 -> 176 bytes guides/assets/images/icons/callouts/9.png | Bin 357 -> 177 bytes guides/assets/images/icons/caution.png | Bin 2554 -> 2300 bytes guides/assets/images/icons/example.png | Bin 2354 -> 2079 bytes guides/assets/images/icons/home.png | Bin 1340 -> 1163 bytes guides/assets/images/icons/important.png | Bin 2657 -> 2451 bytes guides/assets/images/icons/next.png | Bin 1302 -> 1146 bytes guides/assets/images/icons/note.png | Bin 2730 -> 2155 bytes guides/assets/images/icons/prev.png | Bin 1348 -> 1126 bytes guides/assets/images/icons/tip.png | Bin 2602 -> 2248 bytes guides/assets/images/icons/up.png | Bin 1320 -> 1133 bytes guides/assets/images/icons/warning.png | Bin 2828 -> 2616 bytes guides/assets/images/jaimeiniesta.jpg | Bin 11913 -> 7617 bytes guides/assets/images/nav_arrow.gif | Bin 427 -> 419 bytes guides/assets/images/polymorphic.png | Bin 85248 -> 66415 bytes guides/assets/images/radar.png | Bin 19521 -> 17101 bytes guides/assets/images/rails_guides_kindle_cover.jpg | Bin 31785 -> 20955 bytes guides/assets/images/rails_guides_logo.gif | Bin 5114 -> 5106 bytes guides/assets/images/rails_welcome.png | Bin 121314 -> 71979 bytes guides/assets/images/session_fixation.png | Bin 47860 -> 38451 bytes guides/assets/images/tab_grey.gif | Bin 4924 -> 4684 bytes guides/assets/images/tab_info.gif | Bin 4762 -> 4522 bytes guides/assets/images/tab_note.gif | Bin 4807 -> 4566 bytes guides/assets/images/tab_red.gif | Bin 4753 -> 4507 bytes guides/assets/images/tab_yellow.gif | Bin 4759 -> 4519 bytes guides/assets/images/tab_yellow.png | Bin 1611 -> 1441 bytes guides/assets/images/validation_error_messages.png | Bin 1107 -> 583 bytes guides/assets/images/vijaydev.jpg | Bin 4610 -> 2897 bytes 80 files changed, 0 insertions(+), 0 deletions(-) diff --git a/guides/assets/images/belongs_to.png b/guides/assets/images/belongs_to.png index 44243edbca..43c963ffa8 100644 Binary files a/guides/assets/images/belongs_to.png and b/guides/assets/images/belongs_to.png differ diff --git a/guides/assets/images/book_icon.gif b/guides/assets/images/book_icon.gif index c81d5db520..efc5e06880 100644 Binary files a/guides/assets/images/book_icon.gif and b/guides/assets/images/book_icon.gif differ diff --git a/guides/assets/images/challenge.png b/guides/assets/images/challenge.png index d163748640..30be3d7028 100644 Binary files a/guides/assets/images/challenge.png and b/guides/assets/images/challenge.png differ diff --git a/guides/assets/images/chapters_icon.gif b/guides/assets/images/chapters_icon.gif index 06fb415f4a..a61c28c02d 100644 Binary files a/guides/assets/images/chapters_icon.gif and b/guides/assets/images/chapters_icon.gif differ diff --git a/guides/assets/images/check_bullet.gif b/guides/assets/images/check_bullet.gif index 1fcfeba250..bd54ef64c9 100644 Binary files a/guides/assets/images/check_bullet.gif and b/guides/assets/images/check_bullet.gif differ diff --git a/guides/assets/images/credits_pic_blank.gif b/guides/assets/images/credits_pic_blank.gif index f6f654fc65..a6b335d0c9 100644 Binary files a/guides/assets/images/credits_pic_blank.gif and b/guides/assets/images/credits_pic_blank.gif differ diff --git a/guides/assets/images/csrf.png b/guides/assets/images/csrf.png index ab73baafe8..a8123d47c3 100644 Binary files a/guides/assets/images/csrf.png and b/guides/assets/images/csrf.png differ diff --git a/guides/assets/images/customized_error_messages.png b/guides/assets/images/customized_error_messages.png index fa676991e3..fcf47b4be0 100644 Binary files a/guides/assets/images/customized_error_messages.png and b/guides/assets/images/customized_error_messages.png differ diff --git a/guides/assets/images/edge_badge.png b/guides/assets/images/edge_badge.png index cddd46c4b8..a35dc9f8ee 100644 Binary files a/guides/assets/images/edge_badge.png and b/guides/assets/images/edge_badge.png differ diff --git a/guides/assets/images/error_messages.png b/guides/assets/images/error_messages.png index 428892194a..1189e486d4 100644 Binary files a/guides/assets/images/error_messages.png and b/guides/assets/images/error_messages.png differ diff --git a/guides/assets/images/feature_tile.gif b/guides/assets/images/feature_tile.gif index 75469361db..ba0171b761 100644 Binary files a/guides/assets/images/feature_tile.gif and b/guides/assets/images/feature_tile.gif differ diff --git a/guides/assets/images/footer_tile.gif b/guides/assets/images/footer_tile.gif index bb33fc1ff0..09dbfd2973 100644 Binary files a/guides/assets/images/footer_tile.gif and b/guides/assets/images/footer_tile.gif differ diff --git a/guides/assets/images/fxn.png b/guides/assets/images/fxn.png index 9b531ee584..6800fc9bc3 100644 Binary files a/guides/assets/images/fxn.png and b/guides/assets/images/fxn.png differ diff --git a/guides/assets/images/getting_started/confirm_dialog.png b/guides/assets/images/getting_started/confirm_dialog.png index a26c09ef2d..1a13eddd91 100644 Binary files a/guides/assets/images/getting_started/confirm_dialog.png and b/guides/assets/images/getting_started/confirm_dialog.png differ diff --git a/guides/assets/images/getting_started/form_with_errors.png b/guides/assets/images/getting_started/form_with_errors.png index badefe6ea6..6910e1647e 100644 Binary files a/guides/assets/images/getting_started/form_with_errors.png and b/guides/assets/images/getting_started/form_with_errors.png differ diff --git a/guides/assets/images/getting_started/index_action_with_edit_link.png b/guides/assets/images/getting_started/index_action_with_edit_link.png index 6e58a13756..bf23cba231 100644 Binary files a/guides/assets/images/getting_started/index_action_with_edit_link.png and b/guides/assets/images/getting_started/index_action_with_edit_link.png differ diff --git a/guides/assets/images/getting_started/new_post.png b/guides/assets/images/getting_started/new_post.png index dc9459032a..b573cb164c 100644 Binary files a/guides/assets/images/getting_started/new_post.png and b/guides/assets/images/getting_started/new_post.png differ diff --git a/guides/assets/images/getting_started/post_with_comments.png b/guides/assets/images/getting_started/post_with_comments.png index bd9b2e10f5..e13095ff8f 100644 Binary files a/guides/assets/images/getting_started/post_with_comments.png and b/guides/assets/images/getting_started/post_with_comments.png differ diff --git a/guides/assets/images/getting_started/routing_error_no_controller.png b/guides/assets/images/getting_started/routing_error_no_controller.png index 92a39efd78..407ea2ea06 100644 Binary files a/guides/assets/images/getting_started/routing_error_no_controller.png and b/guides/assets/images/getting_started/routing_error_no_controller.png differ diff --git a/guides/assets/images/getting_started/routing_error_no_route_matches.png b/guides/assets/images/getting_started/routing_error_no_route_matches.png index bc768a94a2..d461807c5d 100644 Binary files a/guides/assets/images/getting_started/routing_error_no_route_matches.png and b/guides/assets/images/getting_started/routing_error_no_route_matches.png differ diff --git a/guides/assets/images/getting_started/show_action_for_posts.png b/guides/assets/images/getting_started/show_action_for_posts.png index 5c8c4d8e5e..9467df6a07 100644 Binary files a/guides/assets/images/getting_started/show_action_for_posts.png and b/guides/assets/images/getting_started/show_action_for_posts.png differ diff --git a/guides/assets/images/getting_started/template_is_missing_posts_new.png b/guides/assets/images/getting_started/template_is_missing_posts_new.png index 9f070d59db..6860aaeca7 100644 Binary files a/guides/assets/images/getting_started/template_is_missing_posts_new.png and b/guides/assets/images/getting_started/template_is_missing_posts_new.png differ diff --git a/guides/assets/images/getting_started/undefined_method_post_path.png b/guides/assets/images/getting_started/undefined_method_post_path.png index f568bf315c..c29cb2f54f 100644 Binary files a/guides/assets/images/getting_started/undefined_method_post_path.png and b/guides/assets/images/getting_started/undefined_method_post_path.png differ diff --git a/guides/assets/images/getting_started/unknown_action_create_for_posts.png b/guides/assets/images/getting_started/unknown_action_create_for_posts.png index 03d92dfb7d..1eca14b988 100644 Binary files a/guides/assets/images/getting_started/unknown_action_create_for_posts.png and b/guides/assets/images/getting_started/unknown_action_create_for_posts.png differ diff --git a/guides/assets/images/getting_started/unknown_action_new_for_posts.png b/guides/assets/images/getting_started/unknown_action_new_for_posts.png index b63883d922..fd72586573 100644 Binary files a/guides/assets/images/getting_started/unknown_action_new_for_posts.png and b/guides/assets/images/getting_started/unknown_action_new_for_posts.png differ diff --git a/guides/assets/images/grey_bullet.gif b/guides/assets/images/grey_bullet.gif index e75e8e93a1..3c08b1571c 100644 Binary files a/guides/assets/images/grey_bullet.gif and b/guides/assets/images/grey_bullet.gif differ diff --git a/guides/assets/images/habtm.png b/guides/assets/images/habtm.png index fea78b0b5c..326b91903a 100644 Binary files a/guides/assets/images/habtm.png and b/guides/assets/images/habtm.png differ diff --git a/guides/assets/images/has_many.png b/guides/assets/images/has_many.png index 6cff58460d..e7589e3b75 100644 Binary files a/guides/assets/images/has_many.png and b/guides/assets/images/has_many.png differ diff --git a/guides/assets/images/has_many_through.png b/guides/assets/images/has_many_through.png index 85d7599925..858c898dc1 100644 Binary files a/guides/assets/images/has_many_through.png and b/guides/assets/images/has_many_through.png differ diff --git a/guides/assets/images/has_one.png b/guides/assets/images/has_one.png index a70ddaaa86..93faa05b07 100644 Binary files a/guides/assets/images/has_one.png and b/guides/assets/images/has_one.png differ diff --git a/guides/assets/images/has_one_through.png b/guides/assets/images/has_one_through.png index 89a7617a30..07dac1a27d 100644 Binary files a/guides/assets/images/has_one_through.png and b/guides/assets/images/has_one_through.png differ diff --git a/guides/assets/images/header_backdrop.png b/guides/assets/images/header_backdrop.png index ff2982175e..72b030478f 100644 Binary files a/guides/assets/images/header_backdrop.png and b/guides/assets/images/header_backdrop.png differ diff --git a/guides/assets/images/header_tile.gif b/guides/assets/images/header_tile.gif index e2c878d492..476b5dbd57 100644 Binary files a/guides/assets/images/header_tile.gif and b/guides/assets/images/header_tile.gif differ diff --git a/guides/assets/images/i18n/demo_html_safe.png b/guides/assets/images/i18n/demo_html_safe.png index f881f60dac..9afa8ebec1 100644 Binary files a/guides/assets/images/i18n/demo_html_safe.png and b/guides/assets/images/i18n/demo_html_safe.png differ diff --git a/guides/assets/images/i18n/demo_localized_pirate.png b/guides/assets/images/i18n/demo_localized_pirate.png index 9134709573..bf8d0b558c 100644 Binary files a/guides/assets/images/i18n/demo_localized_pirate.png and b/guides/assets/images/i18n/demo_localized_pirate.png differ diff --git a/guides/assets/images/i18n/demo_translated_en.png b/guides/assets/images/i18n/demo_translated_en.png index ecdd878d38..e887bfa306 100644 Binary files a/guides/assets/images/i18n/demo_translated_en.png and b/guides/assets/images/i18n/demo_translated_en.png differ diff --git a/guides/assets/images/i18n/demo_translated_pirate.png b/guides/assets/images/i18n/demo_translated_pirate.png index 41c580923a..aa5618a865 100644 Binary files a/guides/assets/images/i18n/demo_translated_pirate.png and b/guides/assets/images/i18n/demo_translated_pirate.png differ diff --git a/guides/assets/images/i18n/demo_translation_missing.png b/guides/assets/images/i18n/demo_translation_missing.png index af9e2d0427..867aa7c42d 100644 Binary files a/guides/assets/images/i18n/demo_translation_missing.png and b/guides/assets/images/i18n/demo_translation_missing.png differ diff --git a/guides/assets/images/i18n/demo_untranslated.png b/guides/assets/images/i18n/demo_untranslated.png index 3603f43463..2ea6404822 100644 Binary files a/guides/assets/images/i18n/demo_untranslated.png and b/guides/assets/images/i18n/demo_untranslated.png differ diff --git a/guides/assets/images/icons/callouts/1.png b/guides/assets/images/icons/callouts/1.png index 7d473430b7..c5d02adcf4 100644 Binary files a/guides/assets/images/icons/callouts/1.png and b/guides/assets/images/icons/callouts/1.png differ diff --git a/guides/assets/images/icons/callouts/10.png b/guides/assets/images/icons/callouts/10.png index 997bbc8246..fe89f9ef83 100644 Binary files a/guides/assets/images/icons/callouts/10.png and b/guides/assets/images/icons/callouts/10.png differ diff --git a/guides/assets/images/icons/callouts/11.png b/guides/assets/images/icons/callouts/11.png index ce47dac3f5..9244a1ac4b 100644 Binary files a/guides/assets/images/icons/callouts/11.png and b/guides/assets/images/icons/callouts/11.png differ diff --git a/guides/assets/images/icons/callouts/12.png b/guides/assets/images/icons/callouts/12.png index 31daf4e2f2..ae56459f4c 100644 Binary files a/guides/assets/images/icons/callouts/12.png and b/guides/assets/images/icons/callouts/12.png differ diff --git a/guides/assets/images/icons/callouts/13.png b/guides/assets/images/icons/callouts/13.png index 14021a89c2..1181f9f892 100644 Binary files a/guides/assets/images/icons/callouts/13.png and b/guides/assets/images/icons/callouts/13.png differ diff --git a/guides/assets/images/icons/callouts/14.png b/guides/assets/images/icons/callouts/14.png index 64014b75fe..4274e6580a 100644 Binary files a/guides/assets/images/icons/callouts/14.png and b/guides/assets/images/icons/callouts/14.png differ diff --git a/guides/assets/images/icons/callouts/15.png b/guides/assets/images/icons/callouts/15.png index 0d65765fcf..39304de94f 100644 Binary files a/guides/assets/images/icons/callouts/15.png and b/guides/assets/images/icons/callouts/15.png differ diff --git a/guides/assets/images/icons/callouts/2.png b/guides/assets/images/icons/callouts/2.png index 5d09341b2f..8c57970ba9 100644 Binary files a/guides/assets/images/icons/callouts/2.png and b/guides/assets/images/icons/callouts/2.png differ diff --git a/guides/assets/images/icons/callouts/3.png b/guides/assets/images/icons/callouts/3.png index ef7b700471..57a33d15b4 100644 Binary files a/guides/assets/images/icons/callouts/3.png and b/guides/assets/images/icons/callouts/3.png differ diff --git a/guides/assets/images/icons/callouts/4.png b/guides/assets/images/icons/callouts/4.png index adb8364eb5..f061ab02b8 100644 Binary files a/guides/assets/images/icons/callouts/4.png and b/guides/assets/images/icons/callouts/4.png differ diff --git a/guides/assets/images/icons/callouts/5.png b/guides/assets/images/icons/callouts/5.png index 4d7eb46002..b4de02da11 100644 Binary files a/guides/assets/images/icons/callouts/5.png and b/guides/assets/images/icons/callouts/5.png differ diff --git a/guides/assets/images/icons/callouts/6.png b/guides/assets/images/icons/callouts/6.png index 0ba694af6c..0e055eec1e 100644 Binary files a/guides/assets/images/icons/callouts/6.png and b/guides/assets/images/icons/callouts/6.png differ diff --git a/guides/assets/images/icons/callouts/7.png b/guides/assets/images/icons/callouts/7.png index 472e96f8ac..5ead87d040 100644 Binary files a/guides/assets/images/icons/callouts/7.png and b/guides/assets/images/icons/callouts/7.png differ diff --git a/guides/assets/images/icons/callouts/8.png b/guides/assets/images/icons/callouts/8.png index 5e60973c21..cb99545eb6 100644 Binary files a/guides/assets/images/icons/callouts/8.png and b/guides/assets/images/icons/callouts/8.png differ diff --git a/guides/assets/images/icons/callouts/9.png b/guides/assets/images/icons/callouts/9.png index a0676d26cc..0ac03602f6 100644 Binary files a/guides/assets/images/icons/callouts/9.png and b/guides/assets/images/icons/callouts/9.png differ diff --git a/guides/assets/images/icons/caution.png b/guides/assets/images/icons/caution.png index cb9d5ea0df..031e19c776 100644 Binary files a/guides/assets/images/icons/caution.png and b/guides/assets/images/icons/caution.png differ diff --git a/guides/assets/images/icons/example.png b/guides/assets/images/icons/example.png index bba1c0010d..1b0e482059 100644 Binary files a/guides/assets/images/icons/example.png and b/guides/assets/images/icons/example.png differ diff --git a/guides/assets/images/icons/home.png b/guides/assets/images/icons/home.png index 37a5231bac..24149d6e78 100644 Binary files a/guides/assets/images/icons/home.png and b/guides/assets/images/icons/home.png differ diff --git a/guides/assets/images/icons/important.png b/guides/assets/images/icons/important.png index 1096c23295..dafcf0f59e 100644 Binary files a/guides/assets/images/icons/important.png and b/guides/assets/images/icons/important.png differ diff --git a/guides/assets/images/icons/next.png b/guides/assets/images/icons/next.png index 64e126bdda..355b329f5a 100644 Binary files a/guides/assets/images/icons/next.png and b/guides/assets/images/icons/next.png differ diff --git a/guides/assets/images/icons/note.png b/guides/assets/images/icons/note.png index 841820f7c4..08d35a6f5c 100644 Binary files a/guides/assets/images/icons/note.png and b/guides/assets/images/icons/note.png differ diff --git a/guides/assets/images/icons/prev.png b/guides/assets/images/icons/prev.png index 3e8f12fe24..ea564c865e 100644 Binary files a/guides/assets/images/icons/prev.png and b/guides/assets/images/icons/prev.png differ diff --git a/guides/assets/images/icons/tip.png b/guides/assets/images/icons/tip.png index a3a029d898..d834e6d1bb 100644 Binary files a/guides/assets/images/icons/tip.png and b/guides/assets/images/icons/tip.png differ diff --git a/guides/assets/images/icons/up.png b/guides/assets/images/icons/up.png index 2db1ce62fa..379f0045af 100644 Binary files a/guides/assets/images/icons/up.png and b/guides/assets/images/icons/up.png differ diff --git a/guides/assets/images/icons/warning.png b/guides/assets/images/icons/warning.png index 0b0c419df2..72a8a5d873 100644 Binary files a/guides/assets/images/icons/warning.png and b/guides/assets/images/icons/warning.png differ diff --git a/guides/assets/images/jaimeiniesta.jpg b/guides/assets/images/jaimeiniesta.jpg index 445f048d92..aef95222a9 100644 Binary files a/guides/assets/images/jaimeiniesta.jpg and b/guides/assets/images/jaimeiniesta.jpg differ diff --git a/guides/assets/images/nav_arrow.gif b/guides/assets/images/nav_arrow.gif index c4f57658d7..ff081819ad 100644 Binary files a/guides/assets/images/nav_arrow.gif and b/guides/assets/images/nav_arrow.gif differ diff --git a/guides/assets/images/polymorphic.png b/guides/assets/images/polymorphic.png index ff2fd9f76d..a3cbc4502a 100644 Binary files a/guides/assets/images/polymorphic.png and b/guides/assets/images/polymorphic.png differ diff --git a/guides/assets/images/radar.png b/guides/assets/images/radar.png index f61e08763f..caa5b7655b 100644 Binary files a/guides/assets/images/radar.png and b/guides/assets/images/radar.png differ diff --git a/guides/assets/images/rails_guides_kindle_cover.jpg b/guides/assets/images/rails_guides_kindle_cover.jpg index 9eb16720a9..f068bd9a04 100644 Binary files a/guides/assets/images/rails_guides_kindle_cover.jpg and b/guides/assets/images/rails_guides_kindle_cover.jpg differ diff --git a/guides/assets/images/rails_guides_logo.gif b/guides/assets/images/rails_guides_logo.gif index a24683a34e..9b0ad5af28 100644 Binary files a/guides/assets/images/rails_guides_logo.gif and b/guides/assets/images/rails_guides_logo.gif differ diff --git a/guides/assets/images/rails_welcome.png b/guides/assets/images/rails_welcome.png index f2aa210d19..8ad2d351de 100644 Binary files a/guides/assets/images/rails_welcome.png and b/guides/assets/images/rails_welcome.png differ diff --git a/guides/assets/images/session_fixation.png b/guides/assets/images/session_fixation.png index 6b084508db..ac3ab01614 100644 Binary files a/guides/assets/images/session_fixation.png and b/guides/assets/images/session_fixation.png differ diff --git a/guides/assets/images/tab_grey.gif b/guides/assets/images/tab_grey.gif index e9680b7136..995adb76cf 100644 Binary files a/guides/assets/images/tab_grey.gif and b/guides/assets/images/tab_grey.gif differ diff --git a/guides/assets/images/tab_info.gif b/guides/assets/images/tab_info.gif index 458fea9a61..e9dd164f18 100644 Binary files a/guides/assets/images/tab_info.gif and b/guides/assets/images/tab_info.gif differ diff --git a/guides/assets/images/tab_note.gif b/guides/assets/images/tab_note.gif index 1d5c171ed6..f9b546c6f8 100644 Binary files a/guides/assets/images/tab_note.gif and b/guides/assets/images/tab_note.gif differ diff --git a/guides/assets/images/tab_red.gif b/guides/assets/images/tab_red.gif index daf140b5a8..0613093ddc 100644 Binary files a/guides/assets/images/tab_red.gif and b/guides/assets/images/tab_red.gif differ diff --git a/guides/assets/images/tab_yellow.gif b/guides/assets/images/tab_yellow.gif index dc961c99dd..39a3c2dc6a 100644 Binary files a/guides/assets/images/tab_yellow.gif and b/guides/assets/images/tab_yellow.gif differ diff --git a/guides/assets/images/tab_yellow.png b/guides/assets/images/tab_yellow.png index cceea6581f..3ab1c56c4d 100644 Binary files a/guides/assets/images/tab_yellow.png and b/guides/assets/images/tab_yellow.png differ diff --git a/guides/assets/images/validation_error_messages.png b/guides/assets/images/validation_error_messages.png index 622d35da5d..30e4ca4a3d 100644 Binary files a/guides/assets/images/validation_error_messages.png and b/guides/assets/images/validation_error_messages.png differ diff --git a/guides/assets/images/vijaydev.jpg b/guides/assets/images/vijaydev.jpg index e21d3cabfc..fe5e4f1cb4 100644 Binary files a/guides/assets/images/vijaydev.jpg and b/guides/assets/images/vijaydev.jpg differ -- cgit v1.2.3 From ae0a4ca2e16ff055883f38abb3999b303ba3295c Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 09:49:54 -0500 Subject: removing the surrounding +s in active model readme --- activemodel/README.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index df9ca93051..1485709991 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -75,7 +75,7 @@ behavior out of the box: * Tracking value changes - The ActiveModel::Dirty module allows for tracking attribute changes: + The ActiveModel::Dirty module allows for tracking attribute changes: person = Person.new person.name # => nil @@ -131,7 +131,7 @@ behavior out of the box: * Observer support - ActiveModel::Observers allows your object to implement the Observer + ActiveModel::Observers allows your object to implement the Observer pattern in a Rails App and take advantage of all the standard observer functions. @@ -149,7 +149,7 @@ behavior out of the box: * Making objects serializable - ActiveModel::Serialization provides a standard interface for your object + ActiveModel::Serialization provides a standard interface for your object to provide +to_json+ or +to_xml+ serialization. s = SerialPerson.new -- cgit v1.2.3 From 40b5d2823722fec2c2e02f3ed46f7f47f2205b73 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 7 May 2012 17:04:10 +0200 Subject: Revert "Compressed all images from the guide through ImageOptim which saves sometimes up to 74.6% in size [ci skip]" Reason: this change can't really be done in docrails, see http://weblog.rubyonrails.org/2012/3/7/what-is-docrails/ This reverts commit bc06e8d706fd8818d434c66f46d2e889ca24bd2d. --- guides/assets/images/belongs_to.png | Bin 26076 -> 34017 bytes guides/assets/images/book_icon.gif | Bin 329 -> 337 bytes guides/assets/images/challenge.png | Bin 33373 -> 54134 bytes guides/assets/images/chapters_icon.gif | Bin 620 -> 628 bytes guides/assets/images/check_bullet.gif | Bin 376 -> 384 bytes guides/assets/images/credits_pic_blank.gif | Bin 597 -> 613 bytes guides/assets/images/csrf.png | Bin 32179 -> 41996 bytes guides/assets/images/customized_error_messages.png | Bin 2561 -> 5055 bytes guides/assets/images/edge_badge.png | Bin 5964 -> 7945 bytes guides/assets/images/error_messages.png | Bin 10964 -> 14645 bytes guides/assets/images/feature_tile.gif | Bin 35 -> 43 bytes guides/assets/images/footer_tile.gif | Bin 36 -> 44 bytes guides/assets/images/fxn.png | Bin 15434 -> 20664 bytes .../images/getting_started/confirm_dialog.png | Bin 29542 -> 36070 bytes .../images/getting_started/form_with_errors.png | Bin 14031 -> 20820 bytes .../index_action_with_edit_link.png | Bin 9772 -> 15547 bytes guides/assets/images/getting_started/new_post.png | Bin 5888 -> 14334 bytes .../images/getting_started/post_with_comments.png | Bin 18496 -> 31630 bytes .../routing_error_no_controller.png | Bin 6268 -> 15744 bytes .../routing_error_no_route_matches.png | Bin 6508 -> 16065 bytes .../getting_started/show_action_for_posts.png | Bin 2991 -> 6885 bytes .../template_is_missing_posts_new.png | Bin 5851 -> 15168 bytes .../getting_started/undefined_method_post_path.png | Bin 9217 -> 15254 bytes .../unknown_action_create_for_posts.png | Bin 4146 -> 12652 bytes .../unknown_action_new_for_posts.png | Bin 4208 -> 12756 bytes guides/assets/images/grey_bullet.gif | Bin 37 -> 45 bytes guides/assets/images/habtm.png | Bin 49325 -> 63801 bytes guides/assets/images/has_many.png | Bin 28988 -> 38582 bytes guides/assets/images/has_many_through.png | Bin 79428 -> 100220 bytes guides/assets/images/has_one.png | Bin 29072 -> 39022 bytes guides/assets/images/has_one_through.png | Bin 72434 -> 92594 bytes guides/assets/images/header_backdrop.png | Bin 224 -> 882 bytes guides/assets/images/header_tile.gif | Bin 36 -> 44 bytes guides/assets/images/i18n/demo_html_safe.png | Bin 10073 -> 11946 bytes .../assets/images/i18n/demo_localized_pirate.png | Bin 11485 -> 15027 bytes guides/assets/images/i18n/demo_translated_en.png | Bin 9325 -> 12057 bytes .../assets/images/i18n/demo_translated_pirate.png | Bin 10202 -> 13392 bytes .../images/i18n/demo_translation_missing.png | Bin 10260 -> 13143 bytes guides/assets/images/i18n/demo_untranslated.png | Bin 9224 -> 11925 bytes guides/assets/images/icons/callouts/1.png | Bin 147 -> 329 bytes guides/assets/images/icons/callouts/10.png | Bin 183 -> 361 bytes guides/assets/images/icons/callouts/11.png | Bin 290 -> 565 bytes guides/assets/images/icons/callouts/12.png | Bin 322 -> 617 bytes guides/assets/images/icons/callouts/13.png | Bin 328 -> 623 bytes guides/assets/images/icons/callouts/14.png | Bin 246 -> 411 bytes guides/assets/images/icons/callouts/15.png | Bin 340 -> 640 bytes guides/assets/images/icons/callouts/2.png | Bin 168 -> 353 bytes guides/assets/images/icons/callouts/3.png | Bin 170 -> 350 bytes guides/assets/images/icons/callouts/4.png | Bin 165 -> 345 bytes guides/assets/images/icons/callouts/5.png | Bin 169 -> 348 bytes guides/assets/images/icons/callouts/6.png | Bin 176 -> 355 bytes guides/assets/images/icons/callouts/7.png | Bin 160 -> 344 bytes guides/assets/images/icons/callouts/8.png | Bin 176 -> 357 bytes guides/assets/images/icons/callouts/9.png | Bin 177 -> 357 bytes guides/assets/images/icons/caution.png | Bin 2300 -> 2554 bytes guides/assets/images/icons/example.png | Bin 2079 -> 2354 bytes guides/assets/images/icons/home.png | Bin 1163 -> 1340 bytes guides/assets/images/icons/important.png | Bin 2451 -> 2657 bytes guides/assets/images/icons/next.png | Bin 1146 -> 1302 bytes guides/assets/images/icons/note.png | Bin 2155 -> 2730 bytes guides/assets/images/icons/prev.png | Bin 1126 -> 1348 bytes guides/assets/images/icons/tip.png | Bin 2248 -> 2602 bytes guides/assets/images/icons/up.png | Bin 1133 -> 1320 bytes guides/assets/images/icons/warning.png | Bin 2616 -> 2828 bytes guides/assets/images/jaimeiniesta.jpg | Bin 7617 -> 11913 bytes guides/assets/images/nav_arrow.gif | Bin 419 -> 427 bytes guides/assets/images/polymorphic.png | Bin 66415 -> 85248 bytes guides/assets/images/radar.png | Bin 17101 -> 19521 bytes guides/assets/images/rails_guides_kindle_cover.jpg | Bin 20955 -> 31785 bytes guides/assets/images/rails_guides_logo.gif | Bin 5106 -> 5114 bytes guides/assets/images/rails_welcome.png | Bin 71979 -> 121314 bytes guides/assets/images/session_fixation.png | Bin 38451 -> 47860 bytes guides/assets/images/tab_grey.gif | Bin 4684 -> 4924 bytes guides/assets/images/tab_info.gif | Bin 4522 -> 4762 bytes guides/assets/images/tab_note.gif | Bin 4566 -> 4807 bytes guides/assets/images/tab_red.gif | Bin 4507 -> 4753 bytes guides/assets/images/tab_yellow.gif | Bin 4519 -> 4759 bytes guides/assets/images/tab_yellow.png | Bin 1441 -> 1611 bytes guides/assets/images/validation_error_messages.png | Bin 583 -> 1107 bytes guides/assets/images/vijaydev.jpg | Bin 2897 -> 4610 bytes 80 files changed, 0 insertions(+), 0 deletions(-) diff --git a/guides/assets/images/belongs_to.png b/guides/assets/images/belongs_to.png index 43c963ffa8..44243edbca 100644 Binary files a/guides/assets/images/belongs_to.png and b/guides/assets/images/belongs_to.png differ diff --git a/guides/assets/images/book_icon.gif b/guides/assets/images/book_icon.gif index efc5e06880..c81d5db520 100644 Binary files a/guides/assets/images/book_icon.gif and b/guides/assets/images/book_icon.gif differ diff --git a/guides/assets/images/challenge.png b/guides/assets/images/challenge.png index 30be3d7028..d163748640 100644 Binary files a/guides/assets/images/challenge.png and b/guides/assets/images/challenge.png differ diff --git a/guides/assets/images/chapters_icon.gif b/guides/assets/images/chapters_icon.gif index a61c28c02d..06fb415f4a 100644 Binary files a/guides/assets/images/chapters_icon.gif and b/guides/assets/images/chapters_icon.gif differ diff --git a/guides/assets/images/check_bullet.gif b/guides/assets/images/check_bullet.gif index bd54ef64c9..1fcfeba250 100644 Binary files a/guides/assets/images/check_bullet.gif and b/guides/assets/images/check_bullet.gif differ diff --git a/guides/assets/images/credits_pic_blank.gif b/guides/assets/images/credits_pic_blank.gif index a6b335d0c9..f6f654fc65 100644 Binary files a/guides/assets/images/credits_pic_blank.gif and b/guides/assets/images/credits_pic_blank.gif differ diff --git a/guides/assets/images/csrf.png b/guides/assets/images/csrf.png index a8123d47c3..ab73baafe8 100644 Binary files a/guides/assets/images/csrf.png and b/guides/assets/images/csrf.png differ diff --git a/guides/assets/images/customized_error_messages.png b/guides/assets/images/customized_error_messages.png index fcf47b4be0..fa676991e3 100644 Binary files a/guides/assets/images/customized_error_messages.png and b/guides/assets/images/customized_error_messages.png differ diff --git a/guides/assets/images/edge_badge.png b/guides/assets/images/edge_badge.png index a35dc9f8ee..cddd46c4b8 100644 Binary files a/guides/assets/images/edge_badge.png and b/guides/assets/images/edge_badge.png differ diff --git a/guides/assets/images/error_messages.png b/guides/assets/images/error_messages.png index 1189e486d4..428892194a 100644 Binary files a/guides/assets/images/error_messages.png and b/guides/assets/images/error_messages.png differ diff --git a/guides/assets/images/feature_tile.gif b/guides/assets/images/feature_tile.gif index ba0171b761..75469361db 100644 Binary files a/guides/assets/images/feature_tile.gif and b/guides/assets/images/feature_tile.gif differ diff --git a/guides/assets/images/footer_tile.gif b/guides/assets/images/footer_tile.gif index 09dbfd2973..bb33fc1ff0 100644 Binary files a/guides/assets/images/footer_tile.gif and b/guides/assets/images/footer_tile.gif differ diff --git a/guides/assets/images/fxn.png b/guides/assets/images/fxn.png index 6800fc9bc3..9b531ee584 100644 Binary files a/guides/assets/images/fxn.png and b/guides/assets/images/fxn.png differ diff --git a/guides/assets/images/getting_started/confirm_dialog.png b/guides/assets/images/getting_started/confirm_dialog.png index 1a13eddd91..a26c09ef2d 100644 Binary files a/guides/assets/images/getting_started/confirm_dialog.png and b/guides/assets/images/getting_started/confirm_dialog.png differ diff --git a/guides/assets/images/getting_started/form_with_errors.png b/guides/assets/images/getting_started/form_with_errors.png index 6910e1647e..badefe6ea6 100644 Binary files a/guides/assets/images/getting_started/form_with_errors.png and b/guides/assets/images/getting_started/form_with_errors.png differ diff --git a/guides/assets/images/getting_started/index_action_with_edit_link.png b/guides/assets/images/getting_started/index_action_with_edit_link.png index bf23cba231..6e58a13756 100644 Binary files a/guides/assets/images/getting_started/index_action_with_edit_link.png and b/guides/assets/images/getting_started/index_action_with_edit_link.png differ diff --git a/guides/assets/images/getting_started/new_post.png b/guides/assets/images/getting_started/new_post.png index b573cb164c..dc9459032a 100644 Binary files a/guides/assets/images/getting_started/new_post.png and b/guides/assets/images/getting_started/new_post.png differ diff --git a/guides/assets/images/getting_started/post_with_comments.png b/guides/assets/images/getting_started/post_with_comments.png index e13095ff8f..bd9b2e10f5 100644 Binary files a/guides/assets/images/getting_started/post_with_comments.png and b/guides/assets/images/getting_started/post_with_comments.png differ diff --git a/guides/assets/images/getting_started/routing_error_no_controller.png b/guides/assets/images/getting_started/routing_error_no_controller.png index 407ea2ea06..92a39efd78 100644 Binary files a/guides/assets/images/getting_started/routing_error_no_controller.png and b/guides/assets/images/getting_started/routing_error_no_controller.png differ diff --git a/guides/assets/images/getting_started/routing_error_no_route_matches.png b/guides/assets/images/getting_started/routing_error_no_route_matches.png index d461807c5d..bc768a94a2 100644 Binary files a/guides/assets/images/getting_started/routing_error_no_route_matches.png and b/guides/assets/images/getting_started/routing_error_no_route_matches.png differ diff --git a/guides/assets/images/getting_started/show_action_for_posts.png b/guides/assets/images/getting_started/show_action_for_posts.png index 9467df6a07..5c8c4d8e5e 100644 Binary files a/guides/assets/images/getting_started/show_action_for_posts.png and b/guides/assets/images/getting_started/show_action_for_posts.png differ diff --git a/guides/assets/images/getting_started/template_is_missing_posts_new.png b/guides/assets/images/getting_started/template_is_missing_posts_new.png index 6860aaeca7..9f070d59db 100644 Binary files a/guides/assets/images/getting_started/template_is_missing_posts_new.png and b/guides/assets/images/getting_started/template_is_missing_posts_new.png differ diff --git a/guides/assets/images/getting_started/undefined_method_post_path.png b/guides/assets/images/getting_started/undefined_method_post_path.png index c29cb2f54f..f568bf315c 100644 Binary files a/guides/assets/images/getting_started/undefined_method_post_path.png and b/guides/assets/images/getting_started/undefined_method_post_path.png differ diff --git a/guides/assets/images/getting_started/unknown_action_create_for_posts.png b/guides/assets/images/getting_started/unknown_action_create_for_posts.png index 1eca14b988..03d92dfb7d 100644 Binary files a/guides/assets/images/getting_started/unknown_action_create_for_posts.png and b/guides/assets/images/getting_started/unknown_action_create_for_posts.png differ diff --git a/guides/assets/images/getting_started/unknown_action_new_for_posts.png b/guides/assets/images/getting_started/unknown_action_new_for_posts.png index fd72586573..b63883d922 100644 Binary files a/guides/assets/images/getting_started/unknown_action_new_for_posts.png and b/guides/assets/images/getting_started/unknown_action_new_for_posts.png differ diff --git a/guides/assets/images/grey_bullet.gif b/guides/assets/images/grey_bullet.gif index 3c08b1571c..e75e8e93a1 100644 Binary files a/guides/assets/images/grey_bullet.gif and b/guides/assets/images/grey_bullet.gif differ diff --git a/guides/assets/images/habtm.png b/guides/assets/images/habtm.png index 326b91903a..fea78b0b5c 100644 Binary files a/guides/assets/images/habtm.png and b/guides/assets/images/habtm.png differ diff --git a/guides/assets/images/has_many.png b/guides/assets/images/has_many.png index e7589e3b75..6cff58460d 100644 Binary files a/guides/assets/images/has_many.png and b/guides/assets/images/has_many.png differ diff --git a/guides/assets/images/has_many_through.png b/guides/assets/images/has_many_through.png index 858c898dc1..85d7599925 100644 Binary files a/guides/assets/images/has_many_through.png and b/guides/assets/images/has_many_through.png differ diff --git a/guides/assets/images/has_one.png b/guides/assets/images/has_one.png index 93faa05b07..a70ddaaa86 100644 Binary files a/guides/assets/images/has_one.png and b/guides/assets/images/has_one.png differ diff --git a/guides/assets/images/has_one_through.png b/guides/assets/images/has_one_through.png index 07dac1a27d..89a7617a30 100644 Binary files a/guides/assets/images/has_one_through.png and b/guides/assets/images/has_one_through.png differ diff --git a/guides/assets/images/header_backdrop.png b/guides/assets/images/header_backdrop.png index 72b030478f..ff2982175e 100644 Binary files a/guides/assets/images/header_backdrop.png and b/guides/assets/images/header_backdrop.png differ diff --git a/guides/assets/images/header_tile.gif b/guides/assets/images/header_tile.gif index 476b5dbd57..e2c878d492 100644 Binary files a/guides/assets/images/header_tile.gif and b/guides/assets/images/header_tile.gif differ diff --git a/guides/assets/images/i18n/demo_html_safe.png b/guides/assets/images/i18n/demo_html_safe.png index 9afa8ebec1..f881f60dac 100644 Binary files a/guides/assets/images/i18n/demo_html_safe.png and b/guides/assets/images/i18n/demo_html_safe.png differ diff --git a/guides/assets/images/i18n/demo_localized_pirate.png b/guides/assets/images/i18n/demo_localized_pirate.png index bf8d0b558c..9134709573 100644 Binary files a/guides/assets/images/i18n/demo_localized_pirate.png and b/guides/assets/images/i18n/demo_localized_pirate.png differ diff --git a/guides/assets/images/i18n/demo_translated_en.png b/guides/assets/images/i18n/demo_translated_en.png index e887bfa306..ecdd878d38 100644 Binary files a/guides/assets/images/i18n/demo_translated_en.png and b/guides/assets/images/i18n/demo_translated_en.png differ diff --git a/guides/assets/images/i18n/demo_translated_pirate.png b/guides/assets/images/i18n/demo_translated_pirate.png index aa5618a865..41c580923a 100644 Binary files a/guides/assets/images/i18n/demo_translated_pirate.png and b/guides/assets/images/i18n/demo_translated_pirate.png differ diff --git a/guides/assets/images/i18n/demo_translation_missing.png b/guides/assets/images/i18n/demo_translation_missing.png index 867aa7c42d..af9e2d0427 100644 Binary files a/guides/assets/images/i18n/demo_translation_missing.png and b/guides/assets/images/i18n/demo_translation_missing.png differ diff --git a/guides/assets/images/i18n/demo_untranslated.png b/guides/assets/images/i18n/demo_untranslated.png index 2ea6404822..3603f43463 100644 Binary files a/guides/assets/images/i18n/demo_untranslated.png and b/guides/assets/images/i18n/demo_untranslated.png differ diff --git a/guides/assets/images/icons/callouts/1.png b/guides/assets/images/icons/callouts/1.png index c5d02adcf4..7d473430b7 100644 Binary files a/guides/assets/images/icons/callouts/1.png and b/guides/assets/images/icons/callouts/1.png differ diff --git a/guides/assets/images/icons/callouts/10.png b/guides/assets/images/icons/callouts/10.png index fe89f9ef83..997bbc8246 100644 Binary files a/guides/assets/images/icons/callouts/10.png and b/guides/assets/images/icons/callouts/10.png differ diff --git a/guides/assets/images/icons/callouts/11.png b/guides/assets/images/icons/callouts/11.png index 9244a1ac4b..ce47dac3f5 100644 Binary files a/guides/assets/images/icons/callouts/11.png and b/guides/assets/images/icons/callouts/11.png differ diff --git a/guides/assets/images/icons/callouts/12.png b/guides/assets/images/icons/callouts/12.png index ae56459f4c..31daf4e2f2 100644 Binary files a/guides/assets/images/icons/callouts/12.png and b/guides/assets/images/icons/callouts/12.png differ diff --git a/guides/assets/images/icons/callouts/13.png b/guides/assets/images/icons/callouts/13.png index 1181f9f892..14021a89c2 100644 Binary files a/guides/assets/images/icons/callouts/13.png and b/guides/assets/images/icons/callouts/13.png differ diff --git a/guides/assets/images/icons/callouts/14.png b/guides/assets/images/icons/callouts/14.png index 4274e6580a..64014b75fe 100644 Binary files a/guides/assets/images/icons/callouts/14.png and b/guides/assets/images/icons/callouts/14.png differ diff --git a/guides/assets/images/icons/callouts/15.png b/guides/assets/images/icons/callouts/15.png index 39304de94f..0d65765fcf 100644 Binary files a/guides/assets/images/icons/callouts/15.png and b/guides/assets/images/icons/callouts/15.png differ diff --git a/guides/assets/images/icons/callouts/2.png b/guides/assets/images/icons/callouts/2.png index 8c57970ba9..5d09341b2f 100644 Binary files a/guides/assets/images/icons/callouts/2.png and b/guides/assets/images/icons/callouts/2.png differ diff --git a/guides/assets/images/icons/callouts/3.png b/guides/assets/images/icons/callouts/3.png index 57a33d15b4..ef7b700471 100644 Binary files a/guides/assets/images/icons/callouts/3.png and b/guides/assets/images/icons/callouts/3.png differ diff --git a/guides/assets/images/icons/callouts/4.png b/guides/assets/images/icons/callouts/4.png index f061ab02b8..adb8364eb5 100644 Binary files a/guides/assets/images/icons/callouts/4.png and b/guides/assets/images/icons/callouts/4.png differ diff --git a/guides/assets/images/icons/callouts/5.png b/guides/assets/images/icons/callouts/5.png index b4de02da11..4d7eb46002 100644 Binary files a/guides/assets/images/icons/callouts/5.png and b/guides/assets/images/icons/callouts/5.png differ diff --git a/guides/assets/images/icons/callouts/6.png b/guides/assets/images/icons/callouts/6.png index 0e055eec1e..0ba694af6c 100644 Binary files a/guides/assets/images/icons/callouts/6.png and b/guides/assets/images/icons/callouts/6.png differ diff --git a/guides/assets/images/icons/callouts/7.png b/guides/assets/images/icons/callouts/7.png index 5ead87d040..472e96f8ac 100644 Binary files a/guides/assets/images/icons/callouts/7.png and b/guides/assets/images/icons/callouts/7.png differ diff --git a/guides/assets/images/icons/callouts/8.png b/guides/assets/images/icons/callouts/8.png index cb99545eb6..5e60973c21 100644 Binary files a/guides/assets/images/icons/callouts/8.png and b/guides/assets/images/icons/callouts/8.png differ diff --git a/guides/assets/images/icons/callouts/9.png b/guides/assets/images/icons/callouts/9.png index 0ac03602f6..a0676d26cc 100644 Binary files a/guides/assets/images/icons/callouts/9.png and b/guides/assets/images/icons/callouts/9.png differ diff --git a/guides/assets/images/icons/caution.png b/guides/assets/images/icons/caution.png index 031e19c776..cb9d5ea0df 100644 Binary files a/guides/assets/images/icons/caution.png and b/guides/assets/images/icons/caution.png differ diff --git a/guides/assets/images/icons/example.png b/guides/assets/images/icons/example.png index 1b0e482059..bba1c0010d 100644 Binary files a/guides/assets/images/icons/example.png and b/guides/assets/images/icons/example.png differ diff --git a/guides/assets/images/icons/home.png b/guides/assets/images/icons/home.png index 24149d6e78..37a5231bac 100644 Binary files a/guides/assets/images/icons/home.png and b/guides/assets/images/icons/home.png differ diff --git a/guides/assets/images/icons/important.png b/guides/assets/images/icons/important.png index dafcf0f59e..1096c23295 100644 Binary files a/guides/assets/images/icons/important.png and b/guides/assets/images/icons/important.png differ diff --git a/guides/assets/images/icons/next.png b/guides/assets/images/icons/next.png index 355b329f5a..64e126bdda 100644 Binary files a/guides/assets/images/icons/next.png and b/guides/assets/images/icons/next.png differ diff --git a/guides/assets/images/icons/note.png b/guides/assets/images/icons/note.png index 08d35a6f5c..841820f7c4 100644 Binary files a/guides/assets/images/icons/note.png and b/guides/assets/images/icons/note.png differ diff --git a/guides/assets/images/icons/prev.png b/guides/assets/images/icons/prev.png index ea564c865e..3e8f12fe24 100644 Binary files a/guides/assets/images/icons/prev.png and b/guides/assets/images/icons/prev.png differ diff --git a/guides/assets/images/icons/tip.png b/guides/assets/images/icons/tip.png index d834e6d1bb..a3a029d898 100644 Binary files a/guides/assets/images/icons/tip.png and b/guides/assets/images/icons/tip.png differ diff --git a/guides/assets/images/icons/up.png b/guides/assets/images/icons/up.png index 379f0045af..2db1ce62fa 100644 Binary files a/guides/assets/images/icons/up.png and b/guides/assets/images/icons/up.png differ diff --git a/guides/assets/images/icons/warning.png b/guides/assets/images/icons/warning.png index 72a8a5d873..0b0c419df2 100644 Binary files a/guides/assets/images/icons/warning.png and b/guides/assets/images/icons/warning.png differ diff --git a/guides/assets/images/jaimeiniesta.jpg b/guides/assets/images/jaimeiniesta.jpg index aef95222a9..445f048d92 100644 Binary files a/guides/assets/images/jaimeiniesta.jpg and b/guides/assets/images/jaimeiniesta.jpg differ diff --git a/guides/assets/images/nav_arrow.gif b/guides/assets/images/nav_arrow.gif index ff081819ad..c4f57658d7 100644 Binary files a/guides/assets/images/nav_arrow.gif and b/guides/assets/images/nav_arrow.gif differ diff --git a/guides/assets/images/polymorphic.png b/guides/assets/images/polymorphic.png index a3cbc4502a..ff2fd9f76d 100644 Binary files a/guides/assets/images/polymorphic.png and b/guides/assets/images/polymorphic.png differ diff --git a/guides/assets/images/radar.png b/guides/assets/images/radar.png index caa5b7655b..f61e08763f 100644 Binary files a/guides/assets/images/radar.png and b/guides/assets/images/radar.png differ diff --git a/guides/assets/images/rails_guides_kindle_cover.jpg b/guides/assets/images/rails_guides_kindle_cover.jpg index f068bd9a04..9eb16720a9 100644 Binary files a/guides/assets/images/rails_guides_kindle_cover.jpg and b/guides/assets/images/rails_guides_kindle_cover.jpg differ diff --git a/guides/assets/images/rails_guides_logo.gif b/guides/assets/images/rails_guides_logo.gif index 9b0ad5af28..a24683a34e 100644 Binary files a/guides/assets/images/rails_guides_logo.gif and b/guides/assets/images/rails_guides_logo.gif differ diff --git a/guides/assets/images/rails_welcome.png b/guides/assets/images/rails_welcome.png index 8ad2d351de..f2aa210d19 100644 Binary files a/guides/assets/images/rails_welcome.png and b/guides/assets/images/rails_welcome.png differ diff --git a/guides/assets/images/session_fixation.png b/guides/assets/images/session_fixation.png index ac3ab01614..6b084508db 100644 Binary files a/guides/assets/images/session_fixation.png and b/guides/assets/images/session_fixation.png differ diff --git a/guides/assets/images/tab_grey.gif b/guides/assets/images/tab_grey.gif index 995adb76cf..e9680b7136 100644 Binary files a/guides/assets/images/tab_grey.gif and b/guides/assets/images/tab_grey.gif differ diff --git a/guides/assets/images/tab_info.gif b/guides/assets/images/tab_info.gif index e9dd164f18..458fea9a61 100644 Binary files a/guides/assets/images/tab_info.gif and b/guides/assets/images/tab_info.gif differ diff --git a/guides/assets/images/tab_note.gif b/guides/assets/images/tab_note.gif index f9b546c6f8..1d5c171ed6 100644 Binary files a/guides/assets/images/tab_note.gif and b/guides/assets/images/tab_note.gif differ diff --git a/guides/assets/images/tab_red.gif b/guides/assets/images/tab_red.gif index 0613093ddc..daf140b5a8 100644 Binary files a/guides/assets/images/tab_red.gif and b/guides/assets/images/tab_red.gif differ diff --git a/guides/assets/images/tab_yellow.gif b/guides/assets/images/tab_yellow.gif index 39a3c2dc6a..dc961c99dd 100644 Binary files a/guides/assets/images/tab_yellow.gif and b/guides/assets/images/tab_yellow.gif differ diff --git a/guides/assets/images/tab_yellow.png b/guides/assets/images/tab_yellow.png index 3ab1c56c4d..cceea6581f 100644 Binary files a/guides/assets/images/tab_yellow.png and b/guides/assets/images/tab_yellow.png differ diff --git a/guides/assets/images/validation_error_messages.png b/guides/assets/images/validation_error_messages.png index 30e4ca4a3d..622d35da5d 100644 Binary files a/guides/assets/images/validation_error_messages.png and b/guides/assets/images/validation_error_messages.png differ diff --git a/guides/assets/images/vijaydev.jpg b/guides/assets/images/vijaydev.jpg index fe5e4f1cb4..e21d3cabfc 100644 Binary files a/guides/assets/images/vijaydev.jpg and b/guides/assets/images/vijaydev.jpg differ -- cgit v1.2.3 From 700dd0014b8c19651650923dff28912e7d3607b9 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Mon, 7 May 2012 20:43:04 +0530 Subject: Revert "fixing active model links in readme" This reverts commit c962680e1902d2c9474f0be8ba7b0b8ab361cae6. Reason: The links must be relative to work in both edge and stable api sites. --- activemodel/README.rdoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 1485709991..0c7089598c 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -53,7 +53,7 @@ behavior out of the box: person.clear_name person.clear_age - {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/AttributeMethods.html] + {Learn more}[link:classes/ActiveModel/AttributeMethods.html] * Callbacks for certain operations @@ -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}[http://api.rubyonrails.org/classes/ActiveModel/Callbacks.html] + {Learn more}[link:classes/ActiveModel/Callbacks.html] * Tracking value changes @@ -88,7 +88,7 @@ behavior out of the box: person.save person.previous_changes # => {'name' => ['bob, 'robert']} - {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Dirty.html] + {Learn more}[link:classes/ActiveModel/Dirty.html] * Adding +errors+ interface to objects @@ -116,7 +116,7 @@ behavior out of the box: person.errors.full_messages # => ["Name can not be nil"] - {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Errors.html] + {Learn more}[link:classes/ActiveModel/Errors.html] * Model name introspection @@ -127,7 +127,7 @@ behavior out of the box: NamedPerson.model_name # => "NamedPerson" NamedPerson.model_name.human # => "Named person" - {Learn more}[http://api.rubyonrails.org/ActiveModel/Naming.html] + {Learn more}[link:classes/ActiveModel/Naming.html] * Observer support @@ -145,7 +145,7 @@ behavior out of the box: end end - {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Observer.html] + {Learn more}[link:classes/ActiveModel/Observer.html] * Making objects serializable @@ -157,7 +157,7 @@ behavior out of the box: s.to_json # => "{\"name\":null}" s.to_xml # => "\n "My attribute" - {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Translation.html] + {Learn more}[link:classes/ActiveModel/Translation.html] * Validation support @@ -186,7 +186,7 @@ behavior out of the box: person.first_name = 'zoolander' person.valid? # => false - {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Validations.html] + {Learn more}[link:classes/ActiveModel/Validations.html] * Custom validators @@ -208,7 +208,7 @@ behavior out of the box: p.name = "Bob" p.valid? # => true - {Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Validator.html] + {Learn more}[link:classes/ActiveModel/Validator.html] == Download and installation -- cgit v1.2.3 From 17ef794299ae10c2a7b8ce7a2da68258267c9720 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 11:28:03 -0500 Subject: adding example about using cattr_accessor with subclasses --- .../lib/active_support/core_ext/class/attribute_accessors.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 5cb528cfe9..4f8866ce9d 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -15,6 +15,14 @@ require 'active_support/core_ext/array/extract_options' # Person.hair_colors # => [:brown, :black, :blonde, :red] # Person.new.hair_colors # => [:brown, :black, :blonde, :red] # +# class Female < Person +# end +# +# Female.hair_colors << :pink +# Female.hair_colors # => [:brown, :black, :blonde, :red, :pink] +# Female.new.hair_colors # => [:brown, :black, :blonde, :red, :pink] +# Person.hair_colors # => [:brown, :black, :blonde, :red, :pink] +# # To opt out of the instance writer method, pass :instance_writer => false. # To opt out of the instance reader method, pass :instance_reader => false. # To opt out of both instance methods, pass :instance_accessor => false. -- cgit v1.2.3 From 7b487e5dc16bcf7f94c031cc1411f940df8c0fc8 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 12:39:41 -0500 Subject: added docs to cattr_accessor method --- .../core_ext/class/attribute_accessors.rb | 62 +++++++++++++++++----- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 4f8866ce9d..72a918f839 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -7,21 +7,21 @@ require 'active_support/core_ext/array/extract_options' # also change the value for parent class. Similarly if parent class changes the value # then that would change the value of subclasses too. # -# class Person -# cattr_accessor :hair_colors -# end +# class Person +# cattr_accessor :hair_colors +# end # -# Person.hair_colors = [:brown, :black, :blonde, :red] -# Person.hair_colors # => [:brown, :black, :blonde, :red] -# Person.new.hair_colors # => [:brown, :black, :blonde, :red] +# Person.hair_colors = [:brown, :black, :blonde, :red] +# Person.hair_colors # => [:brown, :black, :blonde, :red] +# Person.new.hair_colors # => [:brown, :black, :blonde, :red] # -# class Female < Person -# end +# class Female < Person +# end # -# Female.hair_colors << :pink -# Female.hair_colors # => [:brown, :black, :blonde, :red, :pink] -# Female.new.hair_colors # => [:brown, :black, :blonde, :red, :pink] -# Person.hair_colors # => [:brown, :black, :blonde, :red, :pink] +# Female.hair_colors << :pink +# Female.hair_colors # => [:brown, :black, :blonde, :red, :pink] +# Female.new.hair_colors # => [:brown, :black, :blonde, :red, :pink] +# Person.hair_colors # => [:brown, :black, :blonde, :red, :pink] # # To opt out of the instance writer method, pass :instance_writer => false. # To opt out of the instance reader method, pass :instance_reader => false. @@ -83,6 +83,44 @@ class Class end end + # Defines class and instance accessors for class attributes. + # + # class Person + # cattr_accessor :hair_colors + # end + # + # Person.hair_colors = [:brown, :black, :blonde, :red] + # Person.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # If a subclass changes the value then that would also change the value for + # parent class. Similarly if parent class changes the value then that would + # change the value of subclasses too. + # + # class Male < Person + # end + # + # Male.hair_colors << :blue + # Person.hair_colors # => [:brown, :black, :blonde, :red, :blue] + # + # To opt out of the instance writer method, pass :instance_writer => false. + # To opt out of the instance reader method, pass :instance_reader => false. + # + # class Person + # cattr_accessor :hair_colors, :instance_writer => false, :instance_reader => false + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # Or pass :instance_accessor => false, to opt out both instance methods. + # + # class Person + # cattr_accessor :hair_colors, :instance_accessor => false + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError def cattr_accessor(*syms, &blk) cattr_reader(*syms) cattr_writer(*syms, &blk) -- cgit v1.2.3 From 2fb6d12ad3a03c1d9b310fc6a01150f1af2af73b Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 17:33:54 -0500 Subject: added docs and examples to cattr_writer method --- .../core_ext/class/attribute_accessors.rb | 46 +++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 72a918f839..7d85fd512c 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -58,6 +58,42 @@ class Class end end + # Defines a class attribute if it's not defined and creates a writer method to allow + # assignment to the attribute. + # + # class Person + # cattr_writer :hair_colors + # end + # + # Person.hair_colors = [:brown, :black] + # Person.class_variable_get("@@hair_colors") # => [:brown, :black] + # Person.new.hair_colors = [:blonde, :red] + # Person.class_variable_get("@@hair_colors") # => [:blonde, :red] + # + # The attribute name must be any word character starting with a letter or underscore + # and without spaces. + # + # class Person + # cattr_writer :"1_Badname " + # end + # # => NameError: invalid attribute name + # + # If you want to opt out the instance writer method, pass instance_writer: false + # or instance_accessor: false. + # + # class Person + # cattr_writer :hair_colors, instance_writer: false + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # Also, you can pass a block to set up the variable with a default value. + # + # class Person + # cattr_writer(:hair_colors) {[:brown, :black, :blonde, :red]} + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] def cattr_writer(*syms) options = syms.extract_options! syms.each do |sym| @@ -103,20 +139,20 @@ class Class # Male.hair_colors << :blue # Person.hair_colors # => [:brown, :black, :blonde, :red, :blue] # - # To opt out of the instance writer method, pass :instance_writer => false. - # To opt out of the instance reader method, pass :instance_reader => false. + # To opt out of the instance writer method, pass instance_writer: false. + # To opt out of the instance reader method, pass instance_reader: false. # # class Person - # cattr_accessor :hair_colors, :instance_writer => false, :instance_reader => false + # cattr_accessor :hair_colors, instance_writer: false, instance_reader: false # end # # Person.new.hair_colors = [:brown] # => NoMethodError # Person.new.hair_colors # => NoMethodError # - # Or pass :instance_accessor => false, to opt out both instance methods. + # Or pass instance_accessor: false, to opt out both instance methods. # # class Person - # cattr_accessor :hair_colors, :instance_accessor => false + # cattr_accessor :hair_colors, instance_accessor: false # end # # Person.new.hair_colors = [:brown] # => NoMethodError -- cgit v1.2.3 From 1ff35304885d86800d802748a053e0f4bef2ac91 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 19:04:27 -0500 Subject: better docs for cattr_accessor and cattr_writer --- .../active_support/core_ext/class/attribute_accessors.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 7d85fd512c..4461cd6608 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -87,10 +87,12 @@ class Class # # Person.new.hair_colors = [:blonde, :red] # => NoMethodError # - # Also, you can pass a block to set up the variable with a default value. + # Also, you can pass a block to set up the attribute with a default value. # # class Person - # cattr_writer(:hair_colors) {[:brown, :black, :blonde, :red]} + # cattr_writer :hair_colors do + # [:brown, :black, :blonde, :red] + # end # end # # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] @@ -157,6 +159,16 @@ class Class # # Person.new.hair_colors = [:brown] # => NoMethodError # Person.new.hair_colors # => NoMethodError + # + # Also you can pass a block to set up the attribute with a default value. + # + # class Person + # cattr_accessor :hair_colors do + # [:brown, :black, :blonde, :red] + # end + # end + # + # Person.class_variable_get("@@hair_colors") #=> [:brown, :black, :blonde, :red] def cattr_accessor(*syms, &blk) cattr_reader(*syms) cattr_writer(*syms, &blk) -- cgit v1.2.3 From 2805c28e3e9a7386fe144754a9b664c424add2b3 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 19:37:00 -0500 Subject: added docs to cattr_reader --- .../core_ext/class/attribute_accessors.rb | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 4461cd6608..8b41b10c32 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -34,6 +34,33 @@ require 'active_support/core_ext/array/extract_options' # Person.new.hair_colors = [:brown] # => NoMethodError # Person.new.hair_colors # => NoMethodError class Class + # Defines a class attribute if it's not defined and creates a reader method that + # returns the attribute value. + # + # class Person + # cattr_reader :hair_colors + # end + # + # Person.class_variable_set("@@hair_colors", [:brown, :black]) + # Person.hair_colors # => [:brown, :black] + # Person.new.hair_colors # => [:brown, :black] + # + # The attribute name must be any word character starting with a letter or underscore + # and without spaces. + # + # class Person + # cattr_reader :"1_Badname " + # end + # # => NameError: invalid attribute name + # + # If you want to opt out the instance writer method, pass instance_reader: false + # or instance_accessor: false. + # + # class Person + # cattr_reader :hair_colors, instance_reader: false + # end + # + # Person.new.hair_colors # => NoMethodError def cattr_reader(*syms) options = syms.extract_options! syms.each do |sym| -- cgit v1.2.3 From 4831a895c445f650c9daf0b445136ceb653f781b Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 7 May 2012 22:47:35 -0500 Subject: added docs to alias_attribute method --- activemodel/lib/active_model/attribute_methods.rb | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 97a83e58af..59977b6142 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -180,6 +180,37 @@ module ActiveModel undefine_attribute_methods end + + # Allows you to make aliases for attributes. + # + # For example: + # + # class Person + # + # include ActiveModel::AttributeMethods + # attr_accessor :name + # attribute_method_prefix 'clear_' + # + # define_attribute_methods [:name] + # + # private + # + # def clear_attribute(attr) + # send("#{attr}=", nil) + # end + # end + # + # class Person + # attr_accessor :nickname + # + # alias_attribute :nickname, :name + # end + # + # person = Person.new + # person.nickname = "Bob" + # person.nickname # => "Bob" + # person.clear_nickname + # person.nickname # => nil def alias_attribute(new_name, old_name) attribute_method_matchers.each do |matcher| matcher_new = matcher.method_name(new_name).to_s -- cgit v1.2.3 From e8d1f10ac42b171b8d0e73a6a59f7e7e4b094a23 Mon Sep 17 00:00:00 2001 From: Edward Tsech Date: Tue, 8 May 2012 09:05:38 +0200 Subject: Improve readability of metaprogramming annotations at AbstractController callbacks. --- actionpack/lib/abstract_controller/callbacks.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index c0fa28cae9..520c210721 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -163,11 +163,11 @@ module AbstractController class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 # Append a before, after or around filter. See _insert_callbacks # for details on the allowed parameters. - def #{filter}_filter(*names, &blk) # def before_filter(*names, &blk) - _insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options| - set_callback(:process_action, :#{filter}, name, options) # set_callback(:process_action, :before, name, options) - end # end - end # end + def #{filter}_filter(*names, &blk) # def before_filter(*names, &blk) + _insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options| + set_callback(:process_action, :#{filter}, name, options) # set_callback(:process_action, :before, name, options) + end # end + end # end # Prepend a before, after or around filter. See _insert_callbacks # for details on the allowed parameters. @@ -179,11 +179,11 @@ module AbstractController # Skip a before, after or around filter. See _insert_callbacks # for details on the allowed parameters. - def skip_#{filter}_filter(*names) # def skip_before_filter(*names) - _insert_callbacks(names) do |name, options| # _insert_callbacks(names) do |name, options| - skip_callback(:process_action, :#{filter}, name, options) # skip_callback(:process_action, :before, name, options) - end # end - end # end + def skip_#{filter}_filter(*names) # def skip_before_filter(*names) + _insert_callbacks(names) do |name, options| # _insert_callbacks(names) do |name, options| + skip_callback(:process_action, :#{filter}, name, options) # skip_callback(:process_action, :before, name, options) + end # end + end # end # *_filter is the same as append_*_filter alias_method :append_#{filter}_filter, :#{filter}_filter # alias_method :append_before_filter, :before_filter -- cgit v1.2.3 From b3bd01c154e8294cbd0ecaa2aa0b7b3ac322592c Mon Sep 17 00:00:00 2001 From: Edward Tsech Date: Tue, 8 May 2012 11:08:15 +0200 Subject: Add annotaion for class_eval in AbstractController#helper_method [ci skip] --- actionpack/lib/abstract_controller/helpers.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index 77cc4c07d9..4e0672d590 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -49,9 +49,9 @@ module AbstractController meths.each do |meth| _helpers.class_eval <<-ruby_eval, __FILE__, __LINE__ + 1 - def #{meth}(*args, &blk) - controller.send(%(#{meth}), *args, &blk) - end + def #{meth}(*args, &blk) # def current_user(*args, &blk) + controller.send(%(#{meth}), *args, &blk) # controller.send(:current_user, *args, &blk) + end # end ruby_eval end end -- cgit v1.2.3 From a9c27e7d5e82099f783f68897bba6741aad2c53c Mon Sep 17 00:00:00 2001 From: Edward Tsech Date: Tue, 8 May 2012 16:26:26 +0200 Subject: Add example for image_submit_tag with confirmation. [ci skip] --- actionpack/lib/action_view/helpers/form_tag_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index ef35a411ad..8e8a56c65c 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -502,6 +502,9 @@ module ActionView # # image_submit_tag("agree.png", :disabled => true, :class => "agree_disagree_button") # # => + # + # image_submit_tag("save.png", :confirm => "Are you sure?") + # # => def image_submit_tag(source, options = {}) options = options.stringify_keys -- cgit v1.2.3 From e8c9aeca4e054a365d2b64f542617a40f656c666 Mon Sep 17 00:00:00 2001 From: "Mark J. Titorenko" Date: Tue, 8 May 2012 15:37:18 +0100 Subject: Fix NumberHelper options wrapping to prevent verbatim blocks being rendered instead of line continuations. While I'm at it, wrap long comment lines consistently. --- .../lib/action_view/helpers/number_helper.rb | 253 +++++++++++++-------- 1 file changed, 161 insertions(+), 92 deletions(-) diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index 2011351bd2..dfc26acfad 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -28,17 +28,20 @@ module ActionView end end - # Formats a +number+ into a US phone number (e.g., (555) 123-9876). You can customize the format - # in the +options+ hash. + # Formats a +number+ into a US phone number (e.g., (555) + # 123-9876). You can customize the format in the +options+ hash. # # ==== Options # - # * :area_code - Adds parentheses around the area code. - # * :delimiter - Specifies the delimiter to use (defaults to "-"). - # * :extension - Specifies an extension to add to the end of the - # generated number. - # * :country_code - Sets the country code for the phone number. - # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. + # * :area_code - Adds parentheses around the area code. + # * :delimiter - Specifies the delimiter to use + # (defaults to "-"). + # * :extension - Specifies an extension to add to the + # end of the generated number. + # * :country_code - Sets the country code for the phone + # number. + # * :raise - If true, raises +InvalidNumberError+ when + # the argument is invalid. # # ==== Examples # @@ -81,24 +84,31 @@ module ActionView ERB::Util.html_escape(str) end - # Formats a +number+ into a currency string (e.g., $13.65). You can customize the format - # in the +options+ hash. + # Formats a +number+ into a currency string (e.g., $13.65). You + # can customize the format in the +options+ hash. # # ==== Options # - # * :locale - Sets the locale to be used for formatting (defaults to current locale). - # * :precision - Sets the level of precision (defaults to 2). - # * :unit - Sets the denomination of the currency (defaults to "$"). - # * :separator - Sets the separator between the units (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults to ","). - # * :format - Sets the format for non-negative numbers (defaults to "%u%n"). - # Fields are %u for the currency, and %n - # for the number. - # * :negative_format - Sets the format for negative numbers (defaults to prepending - # an hyphen to the formatted number given by :format). - # Accepts the same fields than :format, except - # %n is here the absolute value of the number. - # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the level of precision (defaults + # to 2). + # * :unit - Sets the denomination of the currency + # (defaults to "$"). + # * :separator - Sets the separator between the units + # (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ","). + # * :format - Sets the format for non-negative numbers + # (defaults to "%u%n"). Fields are %u for the + # currency, and %n for the number. + # * :negative_format - Sets the format for negative + # numbers (defaults to prepending an hyphen to the formatted + # number given by :format). Accepts the same fields + # than :format, except %n is here the + # absolute value of the number. + # * :raise - If true, raises +InvalidNumberError+ when + # the argument is invalid. # # ==== Examples # @@ -148,23 +158,29 @@ module ActionView end end - # Formats a +number+ as a percentage string (e.g., 65%). You can customize the format in the +options+ hash. + # Formats a +number+ as a percentage string (e.g., 65%). You can + # customize the format in the +options+ hash. # # ==== Options # - # * :locale - Sets the locale to be used for formatting (defaults to current - # locale). - # * :precision - Sets the precision of the number (defaults to 3). - # * :significant - If +true+, precision will be the # of significant_digits. If +false+, - # the # of fractional digits (defaults to +false+). - # * :separator - Sets the separator between the fractional and integer digits (defaults - # to "."). - # * :delimiter - Sets the thousands delimiter (defaults to ""). - # * :strip_insignificant_zeros - If +true+ removes insignificant zeros after the decimal separator - # (defaults to +false+). - # * :format - Specifies the format of the percentage string - # The number field is %n (defaults to "%n%"). - # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). + # * :significant - If +true+, precision will be the # + # of significant_digits. If +false+, the # of fractional + # digits (defaults to +false+). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). + # * :format - Specifies the format of the percentage + # string The number field is %n (defaults to "%n%"). + # * :raise - If true, raises +InvalidNumberError+ when + # the argument is invalid. # # ==== Examples # @@ -200,15 +216,20 @@ module ActionView end end - # Formats a +number+ with grouped thousands using +delimiter+ (e.g., 12,324). You can - # customize the format in the +options+ hash. + # Formats a +number+ with grouped thousands using +delimiter+ + # (e.g., 12,324). You can customize the format in the +options+ + # hash. # # ==== Options # - # * :locale - Sets the locale to be used for formatting (defaults to current locale). - # * :delimiter - Sets the thousands delimiter (defaults to ","). - # * :separator - Sets the separator between the fractional and integer digits (defaults to "."). - # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :delimiter - Sets the thousands delimiter (defaults + # to ","). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :raise - If true, raises +InvalidNumberError+ when + # the argument is invalid. # # ==== Examples # @@ -236,23 +257,32 @@ module ActionView safe_join(parts, options[:separator]) end - # Formats a +number+ with the specified level of :precision (e.g., 112.32 has a precision - # of 2 if +:significant+ is +false+, and 5 if +:significant+ is +true+). + # Formats a +number+ with the specified level of + # :precision (e.g., 112.32 has a precision of 2 if + # +:significant+ is +false+, and 5 if +:significant+ is +true+). # You can customize the format in the +options+ hash. # # ==== Options - # * :locale - Sets the locale to be used for formatting (defaults to current locale). - # * :precision - Sets the precision of the number (defaults to 3). - # * :significant - If +true+, precision will be the # of significant_digits. If +false+, - # the # of fractional digits (defaults to +false+). - # * :separator - Sets the separator between the fractional and integer digits (defaults - # to "."). - # * :delimiter - Sets the thousands delimiter (defaults to ""). - # * :strip_insignificant_zeros - If +true+ removes insignificant zeros after the decimal separator - # (defaults to +false+). - # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). + # * :significant - If +true+, precision will be the # + # of significant_digits. If +false+, the # of fractional + # digits (defaults to +false+). + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +false+). + # * :raise - If true, raises +InvalidNumberError+ when + # the argument is invalid. # # ==== Examples + # # number_with_precision(111.2345) # => 111.235 # number_with_precision(111.2345, :precision => 2) # => 111.23 # number_with_precision(13, :precision => 5) # => 13.00000 @@ -305,23 +335,37 @@ module ActionView STORAGE_UNITS = [:byte, :kb, :mb, :gb, :tb].freeze - # Formats the bytes in +number+ into a more understandable representation - # (e.g., giving it 1500 yields 1.5 KB). This method is useful for - # reporting file sizes to users. You can customize the - # format in the +options+ hash. + # Formats the bytes in +number+ into a more understandable + # representation (e.g., giving it 1500 yields 1.5 KB). This + # method is useful for reporting file sizes to users. You can + # customize the format in the +options+ hash. # - # See number_to_human if you want to pretty-print a generic number. + # See number_to_human if you want to pretty-print a + # generic number. # # ==== Options - # * :locale - Sets the locale to be used for formatting (defaults to current locale). - # * :precision - Sets the precision of the number (defaults to 3). - # * :significant - If +true+, precision will be the # of significant_digits. If +false+, the # of fractional digits (defaults to +true+) - # * :separator - Sets the separator between the fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults to ""). - # * :strip_insignificant_zeros - If +true+ removes insignificant zeros after the decimal separator (defaults to +true+) - # * :prefix - If +:si+ formats the number using the SI prefix (defaults to :binary) - # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. + # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). + # * :significant - If +true+, precision will be the # + # of significant_digits. If +false+, the # of fractional + # digits (defaults to +true+) + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +true+) + # * :prefix - If +:si+ formats the number using the SI + # prefix (defaults to :binary) + # * :raise - If true, raises +InvalidNumberError+ when + # the argument is invalid. + # # ==== Examples + # # number_to_human_size(123) # => 123 Bytes # number_to_human_size(1234) # => 1.21 KB # number_to_human_size(12345) # => 12.1 KB @@ -332,8 +376,10 @@ module ActionView # number_to_human_size(483989, :precision => 2) # => 470 KB # number_to_human_size(1234567, :precision => 2, :separator => ',') # => 1,2 MB # - # Non-significant zeros after the fractional separator are stripped out by default (set - # :strip_insignificant_zeros to +false+ to change that): + # Non-significant zeros after the fractional separator are + # stripped out by default (set + # :strip_insignificant_zeros to +false+ to change + # that): # number_to_human_size(1234567890123, :precision => 5) # => "1.1229 TB" # number_to_human_size(524288000, :precision => 5) # => "500 MB" def number_to_human_size(number, options = {}) @@ -371,33 +417,55 @@ module ActionView DECIMAL_UNITS = {0 => :unit, 1 => :ten, 2 => :hundred, 3 => :thousand, 6 => :million, 9 => :billion, 12 => :trillion, 15 => :quadrillion, -1 => :deci, -2 => :centi, -3 => :mili, -6 => :micro, -9 => :nano, -12 => :pico, -15 => :femto}.freeze - # Pretty prints (formats and approximates) a number in a way it is more readable by humans - # (eg.: 1200000000 becomes "1.2 Billion"). This is useful for numbers that - # can get very large (and too hard to read). + # Pretty prints (formats and approximates) a number in a way it + # is more readable by humans (eg.: 1200000000 becomes "1.2 + # Billion"). This is useful for numbers that can get very large + # (and too hard to read). # - # See number_to_human_size if you want to print a file size. + # See number_to_human_size if you want to print a file + # size. # - # You can also define you own unit-quantifier names if you want to use other decimal units - # (eg.: 1500 becomes "1.5 kilometers", 0.150 becomes "150 milliliters", etc). You may define - # a wide range of unit quantifiers, even fractional ones (centi, deci, mili, etc). + # You can also define you own unit-quantifier names if you want + # to use other decimal units (eg.: 1500 becomes "1.5 + # kilometers", 0.150 becomes "150 milliliters", etc). You may + # define a wide range of unit quantifiers, even fractional ones + # (centi, deci, mili, etc). # # ==== Options - # * :locale - Sets the locale to be used for formatting (defaults to current locale). - # * :precision - Sets the precision of the number (defaults to 3). - # * :significant - If +true+, precision will be the # of significant_digits. If +false+, the # of fractional digits (defaults to +true+) - # * :separator - Sets the separator between the fractional and integer digits (defaults to "."). - # * :delimiter - Sets the thousands delimiter (defaults to ""). - # * :strip_insignificant_zeros - If +true+ removes insignificant zeros after the decimal separator (defaults to +true+) - # * :units - A Hash of unit quantifier names. Or a string containing an i18n scope where to find this hash. It might have the following keys: - # * *integers*: :unit, :ten, :hundred, :thousand, :million, :billion, :trillion, :quadrillion - # * *fractionals*: :deci, :centi, :mili, :micro, :nano, :pico, :femto - # * :format - Sets the format of the output string (defaults to "%n %u"). The field types are: - # %u The quantifier (ex.: 'thousand') - # %n The number - # * :raise - If true, raises +InvalidNumberError+ when the argument is invalid. # + # * :locale - Sets the locale to be used for formatting + # (defaults to current locale). + # * :precision - Sets the precision of the number + # (defaults to 3). + # * :significant - If +true+, precision will be the # + # of significant_digits. If +false+, the # of fractional + # digits (defaults to +true+) + # * :separator - Sets the separator between the + # fractional and integer digits (defaults to "."). + # * :delimiter - Sets the thousands delimiter (defaults + # to ""). + # * :strip_insignificant_zeros - If +true+ removes + # insignificant zeros after the decimal separator (defaults to + # +true+) + # * :units - A Hash of unit quantifier names. Or a + # string containing an i18n scope where to find this hash. It + # might have the following keys: + # * *integers*: :unit, :ten, + # *:hundred, :thousand, :million, + # *:billion, :trillion, + # *:quadrillion + # * *fractionals*: :deci, :centi, + # *:mili, :micro, :nano, + # *:pico, :femto + # * :format - Sets the format of the output string + # (defaults to "%n %u"). The field types are: + # * %u - The quantifier (ex.: 'thousand') + # * %n - The number + # * :raise - If true, raises +InvalidNumberError+ when + # the argument is invalid. # # ==== Examples + # # number_to_human(123) # => "123" # number_to_human(1234) # => "1.23 Thousand" # number_to_human(12345) # => "12.3 Thousand" @@ -414,8 +482,9 @@ module ActionView # :separator => ',', # :significant => false) # => "1,2 Million" # - # Unsignificant zeros after the decimal separator are stripped out by default (set - # :strip_insignificant_zeros to +false+ to change that): + # Non-significant zeros after the decimal separator are stripped + # out by default (set :strip_insignificant_zeros to + # +false+ to change that): # number_to_human(12345012345, :significant_digits => 6) # => "12.345 Billion" # number_to_human(500000000, :precision => 5) # => "500 Million" # -- cgit v1.2.3 From f31613a0312bfb2529d0ac262337cd7338cb868d Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 8 May 2012 23:49:20 +0530 Subject: cut some duplication and minor edits [ci skip] --- .../core_ext/class/attribute_accessors.rb | 41 +++------------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 8b41b10c32..fa1dbfdf06 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -2,37 +2,6 @@ require 'active_support/core_ext/array/extract_options' # Extends the class object with class and instance accessors for class attributes, # just like the native attr* accessors for instance attributes. -# -# Note that unlike +class_attribute+, if a subclass changes the value then that would -# also change the value for parent class. Similarly if parent class changes the value -# then that would change the value of subclasses too. -# -# class Person -# cattr_accessor :hair_colors -# end -# -# Person.hair_colors = [:brown, :black, :blonde, :red] -# Person.hair_colors # => [:brown, :black, :blonde, :red] -# Person.new.hair_colors # => [:brown, :black, :blonde, :red] -# -# class Female < Person -# end -# -# Female.hair_colors << :pink -# Female.hair_colors # => [:brown, :black, :blonde, :red, :pink] -# Female.new.hair_colors # => [:brown, :black, :blonde, :red, :pink] -# Person.hair_colors # => [:brown, :black, :blonde, :red, :pink] -# -# To opt out of the instance writer method, pass :instance_writer => false. -# To opt out of the instance reader method, pass :instance_reader => false. -# To opt out of both instance methods, pass :instance_accessor => false. -# -# class Person -# cattr_accessor :hair_colors, :instance_writer => false, :instance_reader => false -# end -# -# Person.new.hair_colors = [:brown] # => NoMethodError -# Person.new.hair_colors # => NoMethodError class Class # Defines a class attribute if it's not defined and creates a reader method that # returns the attribute value. @@ -45,15 +14,14 @@ class Class # Person.hair_colors # => [:brown, :black] # Person.new.hair_colors # => [:brown, :black] # - # The attribute name must be any word character starting with a letter or underscore - # and without spaces. + # The attribute name must be a valid method name in Ruby. # # class Person # cattr_reader :"1_Badname " # end # # => NameError: invalid attribute name # - # If you want to opt out the instance writer method, pass instance_reader: false + # If you want to opt out the instance reader method, you can pass instance_reader: false # or instance_accessor: false. # # class Person @@ -97,8 +65,7 @@ class Class # Person.new.hair_colors = [:blonde, :red] # Person.class_variable_get("@@hair_colors") # => [:blonde, :red] # - # The attribute name must be any word character starting with a letter or underscore - # and without spaces. + # The attribute name must be a valid method name in Ruby. # # class Person # cattr_writer :"1_Badname " @@ -148,7 +115,7 @@ class Class end end - # Defines class and instance accessors for class attributes. + # Defines both class and instance accessors for class attributes. # # class Person # cattr_accessor :hair_colors -- cgit v1.2.3 From 7e26f7f0f7e3c230c333e1b265727a9b8cf7c91f Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 8 May 2012 23:54:47 +0530 Subject: simplify the alias_attribute example [ci skip] --- activemodel/lib/active_model/attribute_methods.rb | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 59977b6142..25d5d84ce6 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -183,34 +183,15 @@ module ActiveModel # Allows you to make aliases for attributes. # - # For example: - # # class Person - # - # include ActiveModel::AttributeMethods # attr_accessor :name - # attribute_method_prefix 'clear_' - # - # define_attribute_methods [:name] - # - # private - # - # def clear_attribute(attr) - # send("#{attr}=", nil) - # end - # end - # - # class Person - # attr_accessor :nickname - # # alias_attribute :nickname, :name # end # # person = Person.new # person.nickname = "Bob" # person.nickname # => "Bob" - # person.clear_nickname - # person.nickname # => nil + # person.name # => "Bob" def alias_attribute(new_name, old_name) attribute_method_matchers.each do |matcher| matcher_new = matcher.method_name(new_name).to_s -- cgit v1.2.3