Permalink
Browse files

Merge docrails

  • Loading branch information...
1 parent 0c68d23 commit e033b5d037c303a34e0c5aec2b38ec6270f00f86 @lifo lifo committed Jul 25, 2009
Showing with 1,765 additions and 607 deletions.
  1. +1 −1 actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/obsolete.rb
  2. +1 −1 actionpack/lib/action_controller/base/http_authentication.rb
  3. +1 −2 actionpack/lib/action_controller/base/request_forgery_protection.rb
  4. +1 −1 actionpack/lib/action_controller/routing.rb
  5. +1 −1 actionpack/lib/action_controller/routing/generation/url_rewriter.rb
  6. +1 −1 actionpack/lib/action_controller/routing/route_set.rb
  7. +2 −2 actionpack/lib/action_controller/testing/test_case.rb
  8. +5 −5 actionpack/lib/action_view/helpers/date_helper.rb
  9. +21 −21 actionpack/lib/action_view/helpers/form_options_helper.rb
  10. +2 −2 actionpack/lib/action_view/helpers/text_helper.rb
  11. +48 −49 actionpack/lib/action_view/helpers/url_helper.rb
  12. +1 −1 activerecord/lib/active_record.rb
  13. +2 −2 activerecord/lib/active_record/association_preload.rb
  14. +71 −5 activerecord/lib/active_record/associations.rb
  15. +2 −2 activerecord/lib/active_record/associations/association_collection.rb
  16. +39 −3 activerecord/lib/active_record/base.rb
  17. +17 −1 activerecord/lib/active_record/callbacks.rb
  18. +1 −1 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
  19. +8 −0 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
  20. +1 −1 activerecord/lib/active_record/fixtures.rb
  21. +3 −3 activerecord/lib/active_record/migration.rb
  22. +1 −1 activerecord/lib/active_record/nested_attributes.rb
  23. +1 −1 activerecord/lib/active_record/validations.rb
  24. +4 −0 activesupport/lib/active_support/buffered_logger.rb
  25. +3 −3 activesupport/lib/active_support/cache/mem_cache_store.rb
  26. +1 −1 activesupport/lib/active_support/callbacks.rb
  27. +1 −1 activesupport/lib/active_support/core_ext/array/conversions.rb
  28. +1 −1 activesupport/lib/active_support/core_ext/enumerable.rb
  29. +1 −1 activesupport/lib/active_support/core_ext/object/duplicable.rb
  30. +1 −1 activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb
  31. +3 −3 activesupport/lib/active_support/inflector.rb
  32. +1 −1 activesupport/lib/active_support/xml_mini/jdom.rb
  33. +1 −1 activesupport/lib/active_support/xml_mini/nokogiri.rb
  34. +1 −1 activesupport/lib/active_support/xml_mini/rexml.rb
  35. +45 −46 railties/README
  36. +1 −1 railties/configs/seeds.rb
  37. +0 −1 railties/guides/files/javascripts/guides.js
  38. BIN railties/guides/images/fxn.jpg
  39. BIN railties/guides/images/fxn.png
  40. +20 −13 railties/guides/source/action_controller_overview.textile
  41. +16 −14 railties/guides/source/action_mailer_basics.textile
  42. +3 −3 railties/guides/source/active_record_basics.textile
  43. +5 −12 railties/guides/source/active_record_querying.textile
  44. +818 −0 railties/guides/source/active_support_overview.textile
  45. +4 −4 railties/guides/source/activerecord_validations_callbacks.textile
  46. +94 −0 railties/guides/source/ajax_on_rails.textile
  47. +44 −9 railties/guides/source/association_basics.textile
  48. +66 −196 railties/guides/source/caching_with_rails.textile
  49. +1 −1 railties/guides/source/configuring.textile
  50. +1 −1 railties/guides/source/contribute.textile
  51. +10 −1 railties/guides/source/contributing_to_rails.textile
  52. +3 −3 railties/guides/source/credits.erb.textile
  53. +1 −1 railties/guides/source/debugging_rails_applications.textile
  54. +15 −13 railties/guides/source/form_helpers.textile
  55. +71 −58 railties/guides/source/getting_started.textile
  56. +25 −58 railties/guides/source/i18n.textile
  57. +1 −1 railties/guides/source/index.erb.textile
  58. +19 −19 railties/guides/source/layouts_and_rendering.textile
  59. +6 −6 railties/guides/source/migrations.textile
  60. +1 −1 railties/guides/source/performance_testing.textile
  61. +1 −1 railties/guides/source/plugins.textile
  62. +226 −6 railties/guides/source/rails_application_templates.textile
  63. +2 −2 railties/guides/source/rails_on_rack.textile
  64. +4 −4 railties/guides/source/routing.textile
  65. +3 −3 railties/guides/source/security.textile
  66. +10 −8 railties/guides/source/testing.textile
@@ -1,6 +1,6 @@
=begin rdoc
-= Obsolete methods that are depriciated
+= Obsolete methods that are deprecated
If you really want to see them, go to lib/tmail/obsolete.rb and view to your
heart's content.
@@ -276,7 +276,7 @@ def authentication_request(controller, realm, message = nil)
#
# The nonce is opaque to the client. Composed of Time, and hash of Time with secret
# key from the Rails session secret generated upon creation of project. Ensures
- # the time cannot be modifed by client.
+ # the time cannot be modified by client.
def nonce(time = Time.now)
t = time.to_i
hashed = [t, secret_key]
@@ -106,8 +106,7 @@ def verifiable_request_format?
!request.content_type.nil? && request.content_type.verify_request?
end
- # Sets the token value for the current session. Pass a <tt>:secret</tt> option
- # in +protect_from_forgery+ to add a custom salt to the hash.
+ # Sets the token value for the current session.
def form_authenticity_token
session[:_csrf_token] ||= ActiveSupport::SecureRandom.base64(32)
end
@@ -139,7 +139,7 @@ module ActionController
# # In routes.rb
# map.with_options :controller => 'blog' do |blog|
# blog.show '', :action => 'list'
- # blog.delete 'delete/:id', :action => 'delete',
+ # blog.delete 'delete/:id', :action => 'delete'
# blog.edit 'edit/:id', :action => 'edit'
# end
#
@@ -93,7 +93,7 @@ def self.included(base) #:nodoc:
#
# * <tt>:only_path</tt> - If true, the relative url is returned. Defaults to +false+.
# * <tt>:protocol</tt> - The protocol to connect to. Defaults to 'http'.
- # * <tt>:host</tt> - Specifies the host the link should be targetted at.
+ # * <tt>:host</tt> - Specifies the host the link should be targeted at.
# If <tt>:only_path</tt> is false, this option must be
# provided either explicitly, or via +default_url_options+.
# * <tt>:port</tt> - Optionally specify the port to connect to.
@@ -155,7 +155,7 @@ def #{selector}(options = nil) # def hash_f
def define_url_helper(route, name, kind, options)
selector = url_helper_name(name, kind)
- # The segment keys used for positional paramters
+ # The segment keys used for positional parameters
hash_access_method = hash_access_name(name, kind)
@@ -56,7 +56,7 @@ module ActionController
#
# ActionController::TestCase will automatically infer the controller under test
# from the test class name. If the controller cannot be inferred from the test
- # class name, you can explicity set it with +tests+.
+ # class name, you can explicitly set it with +tests+.
#
# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase
# tests WidgetController
@@ -182,7 +182,7 @@ def setup_controller_request_and_response
@controller.send(:initialize_current_url)
end
end
-
+
# Cause the action to be rescued according to the regular rules for rescue_action when the visitor is not local
def rescue_action_in_public!
@request.remote_addr = '208.77.188.166' # example.com
@@ -112,12 +112,12 @@ def time_ago_in_words(from_time, include_seconds = false)
# ==== Options
# * <tt>:use_month_numbers</tt> - Set to true if you want to use month numbers rather than month names (e.g.
# "2" instead of "February").
- # * <tt>:use_short_month</tt> - Set to true if you want to use the abbreviated month name instead of the full
- # name (e.g. "Feb" instead of "February").
- # * <tt>:add_month_number</tt> - Set to true if you want to show both, the month's number and name (e.g.
+ # * <tt>:use_short_month</tt> - Set to true if you want to use abbreviated month names instead of full
+ # month names (e.g. "Feb" instead of "February").
+ # * <tt>:add_month_numbers</tt> - Set to true if you want to use both month numbers and month names (e.g.
# "2 - February" instead of "February").
# * <tt>:use_month_names</tt> - Set to an array with 12 month names if you want to customize month names.
- # Note: You can also use Rails' new i18n functionality for this.
+ # Note: You can also use Rails' i18n functionality for this.
# * <tt>:date_separator</tt> - Specifies a string to separate the date fields. Default is "" (i.e. nothing).
# * <tt>:start_year</tt> - Set the start year for the year select. Default is <tt>Time.now.year - 5</tt>.
# * <tt>:end_year</tt> - Set the end year for the year select. Default is <tt>Time.now.year + 5</tt>.
@@ -128,7 +128,7 @@ def time_ago_in_words(from_time, include_seconds = false)
# as a hidden field instead of showing a select field. Also note that this implicitly sets :discard_day to true.
# * <tt>:discard_year</tt> - Set to true if you don't want to show a year select. This includes the year
# as a hidden field instead of showing a select field.
- # * <tt>:order</tt> - Set to an array containing <tt>:day</tt>, <tt>:month</tt> and <tt>:year</tt> do
+ # * <tt>:order</tt> - Set to an array containing <tt>:day</tt>, <tt>:month</tt> and <tt>:year</tt> to
# customize the order in which the select fields are shown. If you leave out any of the symbols, the respective
# select will not be shown (like when you set <tt>:discard_xxx => true</tt>. Defaults to the order defined in
# the respective locale (e.g. [:year, :month, :day] in the en locale that ships with Rails).
@@ -167,31 +167,31 @@ def collection_select(object, method, collection, value_method, text_method, opt
#
# In addition to the <tt>:include_blank</tt> option documented above,
# this method also supports a <tt>:model</tt> option, which defaults
- # to TimeZone. This may be used by users to specify a different time
- # zone model object. (See +time_zone_options_for_select+ for more
- # information.)
+ # to ActiveSupport::TimeZone. This may be used by users to specify a
+ # different time zone model object. (See +time_zone_options_for_select+
+ # for more information.)
#
- # You can also supply an array of TimeZone objects
+ # You can also supply an array of ActiveSupport::TimeZone objects
# as +priority_zones+, so that they will be listed above the rest of the
- # (long) list. (You can use TimeZone.us_zones as a convenience for
- # obtaining a list of the US time zones, or a Regexp to select the zones
+ # (long) list. (You can use ActiveSupport::TimeZone.us_zones as a convenience
+ # for obtaining a list of the US time zones, or a Regexp to select the zones
# of your choice)
#
# Finally, this method supports a <tt>:default</tt> option, which selects
- # a default TimeZone if the object's time zone is +nil+.
+ # a default ActiveSupport::TimeZone if the object's time zone is +nil+.
#
# Examples:
# time_zone_select( "user", "time_zone", nil, :include_blank => true)
#
# time_zone_select( "user", "time_zone", nil, :default => "Pacific Time (US & Canada)" )
#
- # time_zone_select( "user", 'time_zone', TimeZone.us_zones, :default => "Pacific Time (US & Canada)")
+ # time_zone_select( "user", 'time_zone', ActiveSupport::TimeZone.us_zones, :default => "Pacific Time (US & Canada)")
#
- # time_zone_select( "user", 'time_zone', [ TimeZone['Alaska'], TimeZone['Hawaii'] ])
+ # time_zone_select( "user", 'time_zone', [ ActiveSupport::TimeZone['Alaska'], ActiveSupport::TimeZone['Hawaii'] ])
#
# time_zone_select( "user", 'time_zone', /Australia/)
#
- # time_zone_select( "user", "time_zone", TZInfo::Timezone.all.sort, :model => TZInfo::Timezone)
+ # time_zone_select( "user", "time_zone", ActiveSupport::Timezone.all.sort, :model => ActiveSupport::Timezone)
def time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {})
InstanceTag.new(object, method, self, options.delete(:object)).to_time_zone_select_tag(priority_zones, options, html_options)
end
@@ -393,20 +393,20 @@ def grouped_options_for_select(grouped_options, selected_key = nil, prompt = nil
end
# Returns a string of option tags for pretty much any time zone in the
- # world. Supply a TimeZone name as +selected+ to have it marked as the
- # selected option tag. You can also supply an array of TimeZone objects
- # as +priority_zones+, so that they will be listed above the rest of the
- # (long) list. (You can use TimeZone.us_zones as a convenience for
- # obtaining a list of the US time zones, or a Regexp to select the zones
- # of your choice)
+ # world. Supply a ActiveSupport::TimeZone name as +selected+ to have it
+ # marked as the selected option tag. You can also supply an array of
+ # ActiveSupport::TimeZone objects as +priority_zones+, so that they will
+ # be listed above the rest of the (long) list. (You can use
+ # ActiveSupport::TimeZone.us_zones as a convenience for obtaining a list
+ # of the US time zones, or a Regexp to select the zones of your choice)
#
# The +selected+ parameter must be either +nil+, or a string that names
- # a TimeZone.
+ # a ActiveSupport::TimeZone.
#
- # By default, +model+ is the TimeZone constant (which can be obtained
- # in Active Record as a value object). The only requirement is that the
- # +model+ parameter be an object that responds to +all+, and returns
- # an array of objects that represent time zones.
+ # By default, +model+ is the ActiveSupport::TimeZone constant (which can
+ # be obtained in Active Record as a value object). The only requirement
+ # is that the +model+ parameter be an object that responds to +all+, and
+ # returns an array of objects that represent time zones.
#
# NOTE: Only the option tags are returned, you have to wrap this call in
# a regular HTML select tag.
@@ -436,7 +436,7 @@ def cycle(first_value, *values)
end
# Returns the current cycle string after a cycle has been started. Useful
- # for complex table highlighing or any other design need which requires
+ # for complex table highlighting or any other design need which requires
# the current cycle string in more than one place.
#
# ==== Example
@@ -544,7 +544,7 @@ def auto_link_urls(text, html_options = {})
left, right = $`, $'
# detect already linked URLs and URLs in the middle of a tag
if left =~ /<[^>]+$/ && right =~ /^[^>]*>/
- # do not change string; URL is alreay linked
+ # do not change string; URL is already linked
href
else
# don't include trailing punctuation character as part of the URL
Oops, something went wrong.

0 comments on commit e033b5d

Please sign in to comment.