From a8f2860d0e7db86c61bb70935006100b04667ab1 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sat, 26 Nov 2011 22:26:52 +0530 Subject: Convert aliases monday and sunday to methods A recent change to beginning_of_week and end_of_week added an argument that can be used to specify the week's starting day as a symbol. Now these methods were aliased as monday and sunday respectively which as a consequence of the argument addition, made calls like obj.monday(:sunday) possible. This commit makes them methods on their own. --- railties/guides/source/active_support_core_extensions.textile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'railties/guides') diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 370ab311c2..37719934a6 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -3051,7 +3051,7 @@ d.end_of_week # => Sun, 09 May 2010 d.end_of_week(:sunday) # => Sat, 08 May 2010 -+beginning_of_week+ is aliased to +monday+ and +at_beginning_of_week+. +end_of_week+ is aliased to +sunday+ and +at_end_of_week+. ++beginning_of_week+ is aliased to +at_beginning_of_week+ and +end_of_week+ is aliased to +at_end_of_week+. h6. +prev_week+, +next_week+ @@ -3276,8 +3276,10 @@ The class +DateTime+ is a subclass of +Date+ so by loading +active_support/core_ yesterday tomorrow -beginning_of_week (monday, at_beginning_of_week) +beginning_of_week (at_beginning_of_week) end_of_week (at_end_of_week) +monday +sunday weeks_ago prev_week next_week @@ -3450,8 +3452,9 @@ ago since (in) beginning_of_day (midnight, at_midnight, at_beginning_of_day) end_of_day -beginning_of_week (monday, at_beginning_of_week) +beginning_of_week (at_beginning_of_week) end_of_week (at_end_of_week) +monday weeks_ago prev_week next_week -- cgit v1.2.3