Permalink
Browse files

fix merge conflict with actionpack changelog

  • Loading branch information...
rick
rick committed May 11, 2008
2 parents c8451ae + a7ea06b commit d09a8446d5606a5a0b5c024224b09a1318e9cf4d
Showing with 1,356 additions and 790 deletions.
  1. +13 −12 actionmailer/lib/action_mailer/base.rb
  2. +3 −0 actionpack/CHANGELOG
  3. +13 −13 actionpack/lib/action_controller/assertions/selector_assertions.rb
  4. +29 −23 actionpack/lib/action_controller/base.rb
  5. +2 −1 actionpack/lib/action_controller/caching.rb
  6. +18 −13 actionpack/lib/action_controller/caching/pages.rb
  7. +10 −8 actionpack/lib/action_controller/polymorphic_routes.rb
  8. +10 −4 actionpack/lib/action_controller/record_identifier.rb
  9. +2 −2 actionpack/lib/action_controller/request_forgery_protection.rb
  10. +20 −22 actionpack/lib/action_controller/resources.rb
  11. +31 −4 actionpack/lib/action_controller/routing.rb
  12. +5 −4 actionpack/lib/action_controller/routing/segments.rb
  13. +13 −8 actionpack/lib/action_controller/session/active_record_store.rb
  14. +7 −7 actionpack/lib/action_controller/url_rewriter.rb
  15. +13 −13 actionpack/lib/action_view/base.rb
  16. +5 −4 actionpack/lib/action_view/helpers/date_helper.rb
  17. +3 −3 actionpack/lib/action_view/helpers/form_tag_helper.rb
  18. +36 −6 actionpack/lib/action_view/helpers/prototype_helper.rb
  19. +14 −14 actionpack/lib/action_view/helpers/url_helper.rb
  20. +2 −2 actionpack/lib/action_view/partials.rb
  21. +147 −42 actionpack/test/activerecord/render_partial_with_record_identification_test.rb
  22. +9 −0 actionpack/test/controller/new_render_test.rb
  23. +36 −0 actionpack/test/controller/record_identifier_test.rb
  24. +26 −4 actionpack/test/controller/resources_test.rb
  25. +7 −5 actionpack/test/controller/routing_test.rb
  26. +32 −0 actionpack/test/template/date_helper_test.rb
  27. +1 −1 activemodel/lib/active_model/validations/associated.rb
  28. +11 −11 activemodel/lib/active_model/validations/numericality.rb
  29. +4 −0 activerecord/CHANGELOG
  30. +7 −17 activerecord/README
  31. +6 −1 activerecord/lib/active_record/association_preload.rb
  32. +162 −138 activerecord/lib/active_record/associations.rb
  33. +2 −2 activerecord/lib/active_record/associations/association_proxy.rb
  34. +3 −3 activerecord/lib/active_record/attribute_methods.rb
  35. +88 −82 activerecord/lib/active_record/base.rb
  36. +6 −0 activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
  37. +6 −2 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
  38. +2 −2 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
  39. +12 −12 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  40. +9 −9 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  41. +1 −1 activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
  42. +1 −1 activerecord/lib/active_record/fixtures.rb
  43. +13 −1 activerecord/lib/active_record/reflection.rb
  44. +4 −4 activerecord/lib/active_record/validations.rb
  45. +10 −9 activerecord/test/cases/adapter_test.rb
  46. +4 −0 activerecord/test/cases/associations/eager_test.rb
  47. +6 −0 activerecord/test/cases/associations_test.rb
  48. +35 −0 activerecord/test/cases/attribute_methods_test.rb
  49. +9 −0 activerecord/test/cases/finder_test.rb
  50. +18 −0 activerecord/test/cases/migration_test.rb
  51. +104 −107 activerecord/test/cases/schema_dumper_test.rb
  52. +4 −0 activerecord/test/models/developer.rb
  53. +2 −0 activerecord/test/models/post.rb
  54. +103 −129 activeresource/lib/active_resource/base.rb
  55. +8 −0 activesupport/CHANGELOG
  56. +5 −0 activesupport/lib/active_support/core_ext/date/calculations.rb
  57. +21 −22 activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
  58. +14 −0 activesupport/lib/active_support/deprecation.rb
  59. +5 −0 activesupport/lib/active_support/inflector.rb
  60. +8 −0 activesupport/lib/active_support/time_with_zone.rb
  61. +7 −1 activesupport/lib/active_support/values/time_zone.rb
  62. +23 −0 activesupport/test/core_ext/date_ext_test.rb
  63. +9 −1 activesupport/test/core_ext/time_with_zone_test.rb
  64. +10 −0 activesupport/test/deprecation_test.rb
  65. +25 −0 activesupport/test/time_zone_test.rb
  66. +2 −0 railties/CHANGELOG
  67. +3 −0 railties/bin/dbconsole
  68. +5 −0 railties/helpers/application.rb
  69. +55 −0 railties/lib/commands/dbconsole.rb
  70. +5 −3 railties/lib/initializer.rb
  71. +8 −8 railties/lib/rails/plugin.rb
  72. +1 −1 railties/lib/rails_generator/generators/applications/app/app_generator.rb
  73. +3 −8 railties/lib/tasks/databases.rake
@@ -95,7 +95,7 @@ module ActionMailer #:nodoc:
#
# ActionMailer::Base.default_url_options[:host] = "example.com"
#
- # This can also be set as a configuration option in <tt>environment.rb</tt>:
+ # This can also be set as a configuration option in <tt>config/environment.rb</tt>:
#
# config.action_mailer.default_url_options = { :host => "example.com" }
#
@@ -204,22 +204,23 @@ module ActionMailer #:nodoc:
# Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.
#
# * <tt>smtp_settings</tt> - Allows detailed configuration for <tt>:smtp</tt> delivery method:
- # * <tt>:address</tt> Allows you to use a remote mail server. Just change it from its default "localhost" setting.
- # * <tt>:port</tt> On the off chance that your mail server doesn't run on port 25, you can change it.
- # * <tt>:domain</tt> If you need to specify a HELO domain, you can do it here.
- # * <tt>:user_name</tt> If your mail server requires authentication, set the username in this setting.
- # * <tt>:password</tt> If your mail server requires authentication, set the password in this setting.
- # * <tt>:authentication</tt> If your mail server requires authentication, you need to specify the authentication type here.
+ # * <tt>:address</tt> - Allows you to use a remote mail server. Just change it from its default "localhost" setting.
+ # * <tt>:port</tt> - On the off chance that your mail server doesn't run on port 25, you can change it.
+ # * <tt>:domain</tt> - If you need to specify a HELO domain, you can do it here.
+ # * <tt>:user_name</tt> - If your mail server requires authentication, set the username in this setting.
+ # * <tt>:password</tt> - If your mail server requires authentication, set the password in this setting.
+ # * <tt>:authentication</tt> - If your mail server requires authentication, you need to specify the authentication type here.
# This is a symbol and one of <tt>:plain</tt>, <tt>:login</tt>, <tt>:cram_md5</tt>
#
# * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method
- # * <tt>:location</tt> The location of the sendmail executable, defaults to "/usr/sbin/sendmail"
- # * <tt>:arguments</tt> The command line arguments
- # * <tt>raise_delivery_errors</tt> - whether or not errors should be raised if the email fails to be delivered.
+ # * <tt>:location</tt> - The location of the sendmail executable, defaults to "/usr/sbin/sendmail"
+ # * <tt>:arguments</tt> - The command line arguments
+ #
+ # * <tt>raise_delivery_errors</tt> - Whether or not errors should be raised if the email fails to be delivered.
#
# * <tt>delivery_method</tt> - Defines a delivery method. Possible values are <tt>:smtp</tt> (default), <tt>:sendmail</tt>, and <tt>:test</tt>.
#
- # * <tt>perform_deliveries</tt> - Determines whether deliver_* methods are actually carried out. By default they are,
+ # * <tt>perform_deliveries</tt> - Determines whether <tt>deliver_*</tt> methods are actually carried out. By default they are,
# but this can be turned off to help functional testing.
#
# * <tt>deliveries</tt> - Keeps an array of all the emails sent out through the Action Mailer with <tt>delivery_method :test</tt>. Most useful
@@ -406,7 +407,7 @@ def deliver(mail)
# templating language other than rhtml or rxml are supported.
# To use this, include in your template-language plugin's init
# code or on a per-application basis, this can be invoked from
- # config/environment.rb:
+ # <tt>config/environment.rb</tt>:
#
# ActionMailer::Base.register_template_extension('haml')
def register_template_extension(extension)
View
@@ -1,6 +1,9 @@
*SVN*
* Change the request forgery protection to go by Content-Type instead of request.format so that you can't bypass it by POSTing to "#{request.uri}.xml" [rick]
+* InstanceTag#default_time_from_options with hash args uses Time.current as default; respects hash settings when time falls in system local spring DST gap [Geoff Buesing]
+
+* select_date defaults to Time.zone.today when config.time_zone is set [Geoff Buesing]
* Fixed that TextHelper#text_field would corrypt when raw HTML was used as the value (mchenryc, Kevin Glowacz) [#80]
@@ -21,11 +21,11 @@ module Assertions
# from the response HTML or elements selected by the enclosing assertion.
#
# In addition to HTML responses, you can make the following assertions:
- # * #assert_select_rjs -- Assertions on HTML content of RJS update and
+ # * +assert_select_rjs+ - Assertions on HTML content of RJS update and
# insertion operations.
- # * #assert_select_encoded -- Assertions on HTML encoded inside XML,
+ # * +assert_select_encoded+ - Assertions on HTML encoded inside XML,
# for example for dealing with feed item descriptions.
- # * #assert_select_email -- Assertions on the HTML body of an e-mail.
+ # * +assert_select_email+ - Assertions on the HTML body of an e-mail.
#
# Also see HTML::Selector to learn how to use selectors.
module SelectorAssertions
@@ -136,27 +136,27 @@ def css_select(*args)
# === Equality Tests
#
# The equality test may be one of the following:
- # * <tt>true</tt> -- Assertion is true if at least one element selected.
- # * <tt>false</tt> -- Assertion is true if no element selected.
- # * <tt>String/Regexp</tt> -- Assertion is true if the text value of at least
+ # * <tt>true</tt> - Assertion is true if at least one element selected.
+ # * <tt>false</tt> - Assertion is true if no element selected.
+ # * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
# one element matches the string or regular expression.
- # * <tt>Integer</tt> -- Assertion is true if exactly that number of
+ # * <tt>Integer</tt> - Assertion is true if exactly that number of
# elements are selected.
- # * <tt>Range</tt> -- Assertion is true if the number of selected
+ # * <tt>Range</tt> - Assertion is true if the number of selected
# elements fit the range.
# If no equality test specified, the assertion is true if at least one
# element selected.
#
# To perform more than one equality tests, use a hash with the following keys:
- # * <tt>:text</tt> -- Narrow the selection to elements that have this text
+ # * <tt>:text</tt> - Narrow the selection to elements that have this text
# value (string or regexp).
- # * <tt>:html</tt> -- Narrow the selection to elements that have this HTML
+ # * <tt>:html</tt> - Narrow the selection to elements that have this HTML
# content (string or regexp).
- # * <tt>:count</tt> -- Assertion is true if the number of selected elements
+ # * <tt>:count</tt> - Assertion is true if the number of selected elements
# is equal to this value.
- # * <tt>:minimum</tt> -- Assertion is true if the number of selected
+ # * <tt>:minimum</tt> - Assertion is true if the number of selected
# elements is at least this value.
- # * <tt>:maximum</tt> -- Assertion is true if the number of selected
+ # * <tt>:maximum</tt> - Assertion is true if the number of selected
# elements is at most this value.
#
# If the method is called with a block, once all equality tests are
@@ -159,28 +159,34 @@ class UnknownHttpMethod < ActionControllerError #:nodoc:
#
# Hello #{session[:person]}
#
- # For removing objects from the session, you can either assign a single key to nil, like <tt>session[:person] = nil</tt>, or you can
- # remove the entire session with reset_session.
+ # For removing objects from the session, you can either assign a single key to +nil+:
#
- # Sessions are stored in a browser cookie that's cryptographically signed, but unencrypted, by default. This prevents
- # the user from tampering with the session but also allows him to see its contents.
+ # # removes :person from session
+ # session[:person] = nil
#
- # Do not put secret information in session!
+ # or you can remove the entire session with +reset_session+.
+ #
+ # Sessions are stored by default in a browser cookie that's cryptographically signed, but unencrypted.
+ # This prevents the user from tampering with the session but also allows him to see its contents.
+ #
+ # Do not put secret information in cookie-based sessions!
#
# Other options for session storage are:
#
- # ActiveRecordStore: sessions are stored in your database, which works better than PStore with multiple app servers and,
- # unlike CookieStore, hides your session contents from the user. To use ActiveRecordStore, set
+ # * ActiveRecordStore - Sessions are stored in your database, which works better than PStore with multiple app servers and,
+ # unlike CookieStore, hides your session contents from the user. To use ActiveRecordStore, set
#
- # config.action_controller.session_store = :active_record_store
+ # config.action_controller.session_store = :active_record_store
#
- # in your <tt>environment.rb</tt> and run <tt>rake db:sessions:create</tt>.
+ # in your <tt>config/environment.rb</tt> and run <tt>rake db:sessions:create</tt>.
#
- # MemCacheStore: sessions are stored as entries in your memcached cache. Set the session store type in <tt>environment.rb</tt>:
+ # * MemCacheStore - Sessions are stored as entries in your memcached cache.
+ # Set the session store type in <tt>config/environment.rb</tt>:
#
- # config.action_controller.session_store = :mem_cache_store
+ # config.action_controller.session_store = :mem_cache_store
#
- # This assumes that memcached has been installed and configured properly. See the MemCacheStore docs for more information.
+ # This assumes that memcached has been installed and configured properly.
+ # See the MemCacheStore docs for more information.
#
# == Responses
#
@@ -535,20 +541,20 @@ def process(request, response, method = :perform_action, *arguments) #:nodoc:
#
# <tt>url_for</tt> is used to:
#
- # All keys given to url_for are forwarded to the Route module, save for the following:
- # * <tt>:anchor</tt> -- specifies the anchor name to be appended to the path. For example,
+ # All keys given to +url_for+ are forwarded to the Route module, save for the following:
+ # * <tt>:anchor</tt> - Specifies the anchor name to be appended to the path. For example,
# <tt>url_for :controller => 'posts', :action => 'show', :id => 10, :anchor => 'comments'</tt>
# will produce "/posts/show/10#comments".
- # * <tt>:only_path</tt> -- if true, returns the relative URL (omitting the protocol, host name, and port) (<tt>false</tt> by default)
- # * <tt>:trailing_slash</tt> -- if true, adds a trailing slash, as in "/archive/2005/". Note that this
+ # * <tt>:only_path</tt> - If true, returns the relative URL (omitting the protocol, host name, and port) (<tt>false</tt> by default).
+ # * <tt>:trailing_slash</tt> - If true, adds a trailing slash, as in "/archive/2005/". Note that this
# is currently not recommended since it breaks caching.
- # * <tt>:host</tt> -- overrides the default (current) host if provided.
- # * <tt>:protocol</tt> -- overrides the default (current) protocol if provided.
- # * <tt>:port</tt> -- optionally specify the port to connect to.
- # * <tt>:user</tt> -- Inline HTTP authentication (only plucked out if <tt>:password</tt> is also present).
- # * <tt>:password</tt> -- Inline HTTP authentication (only plucked out if <tt>:user</tt> is also present).
- # * <tt>:skip_relative_url_root</tt> -- if true, the url is not constructed using the relative_url_root of the request so the path
- # will include the web server relative installation directory.
+ # * <tt>:host</tt> - Overrides the default (current) host if provided.
+ # * <tt>:protocol</tt> - Overrides the default (current) protocol if provided.
+ # * <tt>:port</tt> - Optionally specify the port to connect to.
+ # * <tt>:user</tt> - Inline HTTP authentication (only plucked out if <tt>:password</tt> is also present).
+ # * <tt>:password</tt> - Inline HTTP authentication (only plucked out if <tt>:user</tt> is also present).
+ # * <tt>:skip_relative_url_root</tt> - If true, the url is not constructed using the +relative_url_root+
+ # of the request so the path will include the web server relative installation directory.
#
# The URL is generated from the remaining keys in the hash. A URL contains two key parts: the <base> and a query string.
# Routes composes a query string as the key/value pairs not included in the <base>.
@@ -20,7 +20,8 @@ module ActionController #:nodoc:
#
# == Caching stores
#
- # All the caching stores from ActiveSupport::Cache is available to be used as backends for Action Controller caching.
+ # All the caching stores from ActiveSupport::Cache is available to be used as backends for Action Controller caching. This setting only
+ # affects action and fragment caching as page caching is always written to disk.
#
# Configuration examples (MemoryStore is the default):
#
@@ -4,23 +4,24 @@
module ActionController #:nodoc:
module Caching
# Page caching is an approach to caching where the entire action output of is stored as a HTML file that the web server
- # can serve without going through the Action Pack. This can be as much as 100 times faster than going through the process of dynamically
- # generating the content. Unfortunately, this incredible speed-up is only available to stateless pages where all visitors
- # are treated the same. Content management systems -- including weblogs and wikis -- have many pages that are a great fit
- # for this approach, but account-based systems where people log in and manipulate their own data are often less likely candidates.
+ # can serve without going through Action Pack. This is the fastest way to cache your content as opposed to going dynamically
+ # through the process of generating the content. Unfortunately, this incredible speed-up is only available to stateless pages
+ # where all visitors are treated the same. Content management systems -- including weblogs and wikis -- have many pages that are
+ # a great fit for this approach, but account-based systems where people log in and manipulate their own data are often less
+ # likely candidates.
#
- # Specifying which actions to cache is done through the <tt>caches</tt> class method:
+ # Specifying which actions to cache is done through the <tt>caches_page</tt> class method:
#
# class WeblogController < ActionController::Base
# caches_page :show, :new
# end
#
- # This will generate cache files such as weblog/show/5 and weblog/new, which match the URLs used to trigger the dynamic
- # generation. This is how the web server is able pick up a cache file when it exists and otherwise let the request pass on to
- # the Action Pack to generate it.
+ # This will generate cache files such as <tt>weblog/show/5.html</tt> and <tt>weblog/new.html</tt>,
+ # which match the URLs used to trigger the dynamic generation. This is how the web server is able
+ # pick up a cache file when it exists and otherwise let the request pass on to Action Pack to generate it.
#
# Expiration of the cache is handled by deleting the cached file, which results in a lazy regeneration approach where the cache
- # is not restored before another hit is made against it. The API for doing so mimics the options from url_for and friends:
+ # is not restored before another hit is made against it. The API for doing so mimics the options from +url_for+ and friends:
#
# class WeblogController < ActionController::Base
# def update
@@ -35,13 +36,17 @@ module Caching
#
# == Setting the cache directory
#
- # The cache directory should be the document root for the web server and is set using Base.page_cache_directory = "/document/root".
- # For Rails, this directory has already been set to Rails.public_path (which is usually set to RAILS_ROOT + "/public").
+ # The cache directory should be the document root for the web server and is set using <tt>Base.page_cache_directory = "/document/root"</tt>.
+ # For Rails, this directory has already been set to Rails.public_path (which is usually set to <tt>RAILS_ROOT + "/public"</tt>). Changing
+ # this setting can be useful to avoid naming conflicts with files in <tt>public/</tt>, but doing so will likely require configuring your
+ # web server to look in the new location for cached files.
#
# == Setting the cache extension
#
- # By default, the cache extension is .html, which makes it easy for the cached files to be picked up by the web server. If you want
- # something else, like .php or .shtml, just set Base.page_cache_extension.
+ # Most Rails requests do not have an extension, such as <tt>/weblog/new</tt>. In these cases, the page caching mechanism will add one in
+ # order to make it easy for the cached files to be picked up properly by the web server. By default, this cache extension is <tt>.html</tt>.
+ # If you want something else, like <tt>.php</tt> or <tt>.shtml</tt>, just set Base.page_cache_extension. In cases where a request already has an
+ # extension, such as <tt>.xml</tt> or <tt>.rss</tt>, page caching will not add an extension. This allows it to work well with RESTful apps.
module Pages
def self.included(base) #:nodoc:
base.extend(ClassMethods)
@@ -47,25 +47,27 @@ module PolymorphicRoutes
# Constructs a call to a named RESTful route for the given record and returns the
# resulting URL string. For example:
#
- # polymorphic_url(post)
- # # calls post_url(post) #=> "http://example.com/posts/1"
+ # # calls post_url(post)
+ # polymorphic_url(post) # => "http://example.com/posts/1"
#
# ==== Options
- # * <tt>:action</tt> -- specifies the action prefix for the named route:
- # <tt>:new</tt>, <tt>:edit</tt> or <tt>:formatted</tt>. Default is no prefix.
- # * <tt>:routing_type</tt> -- <tt>:path</tt> or <tt>:url</tt> (default <tt>:url</tt>).
+ #
+ # * <tt>:action</tt> - Specifies the action prefix for the named route:
+ # <tt>:new</tt>, <tt>:edit</tt>, or <tt>:formatted</tt>. Default is no prefix.
+ # * <tt>:routing_type</tt> - Allowed values are <tt>:path</tt> or <tt>:url</tt>.
+ # Default is <tt>:url</tt>.
#
# ==== Examples
#
# # an Article record
- # polymorphic_url(record) #-> article_url(record)
+ # polymorphic_url(record) # same as article_url(record)
#
# # a Comment record
- # polymorphic_url(record) #-> comment_url(record)
+ # polymorphic_url(record) # same as comment_url(record)
#
# # it recognizes new records and maps to the collection
# record = Comment.new
- # polymorphic_url(record) #-> comments_url()
+ # polymorphic_url(record) # same as comments_url()
#
def polymorphic_url(record_or_hash_or_array, options = {})
if record_or_hash_or_array.kind_of?(Array)
Oops, something went wrong.

0 comments on commit d09a844

Please sign in to comment.