Commit Graph

16351 Commits

Author SHA1 Message Date
Martin
e807476d31 added convenience methods #notice and #alert to flash.now
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 16:52:19 +02:00
Paco Guzman
cdf700147c fix assert_select messages to its declaration behaviour
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 16:31:36 +02:00
José Valim
6f0ed7aa52 Update generators test. 2010-05-15 15:21:14 +02:00
wycats
9cfeefb637 Reorganized initializers a bit to enable better hooks for common cases without the need for Railtie. Specifically, the following hooks were added:
* before_configuration: this hook is run immediately after the Application class 
  comes into existence, but before the user has added any configuration. This is
  the appropriate place to set configuration for your plugin
* before_initialize: This is run after all of the user's configuration has completed,
  but before any initializers have begun (in other words, it runs right after
  config/environments/{development,production,test}.rb)
* after_initialize: This is run after all of the initializers have run. It is an
  appropriate place for forking in a preforking setup

Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie.
2010-05-15 06:09:07 -07:00
wycats
458f5712dc Remove the need for a special action_mailer.url_for initializer that loads before anything else 2010-05-15 06:09:07 -07:00
Jeroen van Dijk + Rodrigo Urubatan
80fc6536bd Added Rake task rails:templates:copy to copy templates for customization [#4574 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 14:59:29 +02:00
Carlos Antonio da Silva
c77794a924 Add missing require to with_options [#4601 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 14:54:07 +02:00
Neeraj Singh
58adc67371 STI should not ignore type condition while applying scopes from parent class scopes
[#4507 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 09:48:49 +02:00
Adrian Sanchez
bcf5fea5e5 Bundler deprecated options in Gemfile with application template using method "gem" [#4534 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 09:43:20 +02:00
Marc-Andre Lafortune
9869ee77cd Accept :alt => nil on image_tag [#4558 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 09:43:15 +02:00
Santiago Pastorino
7ffe76046a ActiveResource shouldn't consider modules in the path
[#4529 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 09:38:32 +02:00
José Valim
d18a2742e0 Improve previous patch a bit [#3645 state:resolved] 2010-05-15 09:08:40 +02:00
Stephen Celis
6e69b42b21 Let label helpers accept blocks.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 08:59:08 +02:00
David Chelimsky + Brian Tatnall
35a114a894 Modified default_scope to merge with any pre-existing default_scope
and added AR::Base::clear_default_scope

- clear_default_scope provides users who rely on the old behaviour
  of each call to default_scope overwriting any previous default
  scopes an opportunity to maintain that behaviour.

[#4583 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 08:38:28 +02:00
Neeraj Singh
a0621c1086 Better code formatting and proper line numbers for stack traces
[#4596 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-14 12:24:01 -07:00
Santiago Pastorino
0c37bf8f91 To allow proper fisting of stack trace
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-14 10:36:59 -07:00
Mikel Lindsaar
4a8a62058a Changed encoding behaviour of mail, so updated tests in actionmailer and bumped mail version to 2.2.1
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-14 09:27:47 +02:00
Josh Kalderimis
92160219a8 minor changes to instance level validations implementation based on feedback from José Valim 2010-05-13 13:57:37 -07:00
Josh Kalderimis
9131a88bb8 validation macros can now be used within an instance 2010-05-13 13:57:37 -07:00
Xavier Noria
2203c781a7 defines prev_(month|year) in Date and Time to ease transition to 1.9, and deprecates last_(month|year) 2010-05-12 23:04:17 +02:00
Santiago Pastorino
903637f5f0 Fixes to_json and to_xml for ActiveResource
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-12 21:02:31 +02:00
Santiago Pastorino
6334006b81 Revert "Refactor of active_model/naming.rb and allow collection and element to be writable"
This reverts commit f7862b2c34.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-12 21:02:16 +02:00
Santiago Pastorino
bea3c26833 Make ActiveResource serialize XML correctly when element_name is set.
[#4529]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-12 09:31:36 -07:00
Santiago Pastorino
f7862b2c34 Refactor of active_model/naming.rb and allow collection and element to be writable
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-12 09:31:30 -07:00
Santiago Pastorino
42fa2714c5 Make use of to_xml and to_json in tests
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-12 09:31:30 -07:00
Xavier Noria
7321a3a7d3 revises the rdoc of #average according to 5f3bd55, and realigns when clauses 2010-05-12 08:47:55 +02:00
Santiago Pastorino
5f3bd55726 type_cast_calculated_value refactor: value is never a Fixnum here. Fix test since SQLite returns Float.
[#4514 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-11 22:29:26 -07:00
Xavier Noria
75ddbfecde Gemfile requires sqlite3-ruby 1.3.0.beta.1 2010-05-12 00:37:23 +02:00
Blake Smith
a4207c1084 Make sure timestamp is properly referenced
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-11 20:06:26 +02:00
Pratik Naik
88b4a8fcaf Remove undocumented save_without_validation! 2010-05-11 15:39:29 +01:00
Pratik Naik
475d1d1713 Use arel instead of sql strings 2010-05-11 15:32:41 +01:00
Pratik Naik
1f675ea8c7 Succint save definition 2010-05-11 13:50:09 +01:00
Josh Kalderimis
446b0ffe1c corrected error message in session/cookie_store [#4546 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-10 12:37:01 +03:00
José Valim
5c245b91d2 Make sure valid? preceives the context as in ActiveModel API (ht: Carlos Antonio) 2010-05-10 12:28:38 +03:00
Pratik Naik
ce5827ea47 Make sure schema dumper doesnt throw up when there are no index lengths 2010-05-09 12:43:06 +01:00
Pratik Naik
8d2f6c16e3 Revert "Revert "Add index length support for MySQL [#1852 state:open]""
This reverts commit 6626833db1.
2010-05-09 12:42:48 +01:00
Pratik Naik
f75a6fec29 Improve code from 231d7676f7 2010-05-09 12:33:25 +01:00
Josh Kalderimis
231d7676f7 corrected AR find_each and find_in_batches to raise when the user uses select but does not specify the primary key
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-09 13:14:47 +03:00
José Valim
06eaf27fff Merge branch 'master' of github.com:rails/rails 2010-05-09 13:02:55 +03:00
José Valim
6c2d974e15 Use annoted source code in Template:Error to avoid special cases in the show exceptions middleware. 2010-05-09 12:52:30 +03:00
Xavier Noria
e1a0d86fe0 Merge remote branch 'rails/master' 2010-05-09 11:46:45 +02:00
Xavier Noria
1ff3d951e6 AS guide: more date calculation utilities 2010-05-09 12:45:21 +03:00
Xavier Noria
df508bd970 aliases Date#sunday to Date#end_of_week, for symmetry with existing alias Date#monday -> Date#beginning_of_week 2010-05-09 11:16:34 +02:00
Xavier Noria
08d991ad40 AS guide: you know, the 10th is not November 2010-05-09 11:44:22 +03:00
Xavier Noria
345c38a527 AS guide: adds a catchall note about date calculations around the calendar reform 2010-05-09 11:41:13 +03:00
Xavier Noria
2969543cef adds calendar reform test coverage for more relevant date calculations 2010-05-09 10:26:21 +02:00
Santiago Pastorino
c31b386a88 Updates bundler information, now bundler has a homepage 2010-05-08 21:41:41 -03:00
wycats
d916c62cfc eliminate alias_method_chain from ActiveRecord 2010-05-09 02:37:52 +03:00
Xavier Noria
7a5aa35ed0 AS guide: documents some Date calculations (calendar reform details pending) 2010-05-09 02:29:02 +03:00
Xavier Noria
636ffa1f08 Backports Date#>> from 1.9 so that calculations do the right thing around the calendar reform
Our next_month gives November for some late dates in September of 1582.
Related methods, last_*, and in general advance have the same issues.
This commit fixes those, see the test suite for expected behavior, which
we still run in 1.9 to ensure it matches as we do with other methods
defined in Date in 1.9.
2010-05-09 01:20:23 +02:00