Commit Graph

16407 Commits

Author SHA1 Message Date
Marius Nuennerich
aa4fe9fb33 fix documentation typo
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-05-18 19:29:17 -03:00
Josiah Ivey
ea9398f9ba Guides: Fix numerous broken links 2010-05-16 21:58:47 -05:00
Rizwan Reza
d148a6f6ba Merge branch 'master' of git://github.com/rails/rails 2010-05-17 02:40:15 +04:30
Rizwan Reza
e1c7730069 Merge branch 'master' of github.com:lifo/docrails 2010-05-17 02:39:10 +04:30
Rizwan Reza
4679b72cba Changed guide to use random_element. 2010-05-17 02:11:56 +04:30
Federico Brubacher
6b4e0cc526 a cloned object no longer mimics changed flags from creator , plus a test case [#4614 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 23:04:40 +02:00
Jeremy Kemper
ade756fe42 Moved encoding work in progress to a feature branch.
This reverts commits af0d1a88157942c6e6398dbf73891cff1e152405 and 64d109e3539ad600f58536d3ecabd2f87b67fd1c.
2010-05-16 13:55:29 -07:00
Santiago Pastorino
821e15e5f2 Change on Array extension from rand => random_element [#4555 state:committed]
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-05-16 22:23:44 +02:00
Josiah Ivey
774f596693 Fix punctuation and keep the tone consistent 2010-05-16 13:58:56 -05:00
wycats
64d109e353 Significantly improved internal encoding heuristics and support.
* Default Encoding.default_internal to UTF-8
* Eliminated the use of file-wide magic comments to coerce code evaluated inside the file
* Read templates as BINARY, use default_external or template-wide magic comments
  inside the Template to set the initial encoding
  * This means that template handlers in Ruby 1.9 will receive Strings encoded
    in default_internal (UTF-8 by default)
* Create a better Exception for encoding issues, and use it when the template
  source has bytes that are not compatible with the specified encoding
* Allow template handlers to opt-into handling BINARY. If they do so, they
  need to do some of their own manual encoding work
* Added a "Configuration Gotchas" section to the intro Rails Guide instructing
  users to use UTF-8 for everything
* Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid
  $KCODE value is used

Also:
* Fixed a few tests that were assert() rather than assert_equal() and
  were caught by Minitest requiring a String for the message
* Fixed a test where an assert_select was misformed, also caught by
  Minitest being more restrictive
* Fixed a test where a Rack response was returning a String rather
  than an Enumerable
2010-05-16 22:44:43 +04:00
wycats
af0d1a8815 Initial work to improve the state of encodings for templates 2010-05-16 22:43:35 +04:00
Priit Tamboom
f8432108e8 Added nokogiri dependency to Gemfile [#4617 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 20:33:46 +02:00
Nobuhiro IMAI
5d0afe75eb prevent to run fixture accessor (e.g. test_foos for TestFoo model) as a test case [#2992 state:resolved]
Signed-off-by: Wijnand Wiersma <wijnand@videre.net>
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 20:14:36 +02:00
Santiago Pastorino
9ef232a785 Gemfile requires sqlite3-ruby = 1.3.0.beta.2
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-05-16 19:48:05 +02:00
Simon Jefford
7be58b6163 Tests for new reserved words [#4602 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 19:15:24 +02:00
Aleksandr Koss
b7bdacf1ab Added rails command aliases (s g c db) to reserved words in app generator [#4602 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 19:15:01 +02:00
Franck Verrot
621ee373cb I have updated the documentation according to ticket #4263 about fixtures and set_fixture_class
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 18:04:31 +02:00
Rizwan Reza
d61dbce482 Take out stale tasks from Actionpack's Rakefile [#4619 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 17:49:33 +02:00
Rizwan Reza
6c69221985 Takes out stale methods relating to edge_rails_version
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 17:21:29 +02:00
Santiago Pastorino
fa5f93698d Added missing require, we are using bind method defined on active_support/core_ext/proc
[#4610 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 16:16:15 +02:00
Santiago Pastorino
fdfebb7782 Make use of assert_equal to test equallity between object assert expects and object and a message of error
[#4611 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 16:06:28 +02:00
Wijnand Wiersma
d7a3e65c50 Postgresql doesn't allow to change a string type column to a binary type. Skip this test for postgresql for now. [#4616 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 15:15:43 +02:00
Simon Jefford
f58bdae1f7 Check blocks are not incorrectly detected when compiling erubis templates [#4575 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 15:05:07 +02:00
Hussein Morsy
4ea48f2a98 Fixed 1 failure in ActionPack testsuite [#4613 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 15:00:35 +02:00
José Valim
6cabc9a61f Add some comments related to Hash method check. 2010-05-16 14:34:36 +02:00
pleax
2dc1402417 added support for html attributes in options_for_select [#2165]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 14:33:04 +02:00
rohit
fc2480a277 Fixed 1 failure and 2 errors in ActionPack testsuite [#4613 state:commited]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 14:32:53 +02:00
Aleksandr Koss
3e84ea014e Fix Hash#index deprecated warning in 1.9.x [#4600 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 14:32:48 +02:00
José Valim
1a2d556de7 Rename assert_attribute_type to asser_field_type. 2010-05-16 12:07:44 +02:00
Jeff Kreeftmeijer
5ff6de0982 Added assert_attribute_type to clean up GeneratedAttributeTest [#2377 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 12:07:22 +02:00
José Valim
99b38f371a Move AD::Cascade to the bottom of the middleware stack. 2010-05-16 12:03:11 +02:00
Jeff Kreeftmeijer
4750e61bfe using :time_select when the attribute type is :time in the scaffold generator. [#2377 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 10:52:36 +02:00
rohit
afe57dda26 Fixed two failing tests in railties on 1.9.2-head [#4609 state:commited]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 10:47:03 +02:00
Elomar França
edec1afe25 Don't carry default value when changing column for a binary type on MySQL [#3234 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-16 10:45:26 +02:00
Neeraj Singh
5de2e0d416 better documentation for dependent option [#4564 state:resolved] 2010-05-16 06:47:16 +04:30
José Valim
3afdfc35e8 Expose remaining hooks to minimize the need for a Railtie based on feedback from plugin developers. 2010-05-16 00:36:46 +02:00
Xavier Noria
24610c9b28 simplify contact information in the guides contribution guide 2010-05-16 00:09:55 +02:00
Xavier Noria
08fb1c4565 updates the contribute guide in several aspects 2010-05-16 00:00:38 +02:00
José Valim
351816fab6 Ensure that eager_load actually takes place just after the middleware stack is built by using another pattern.
Also create a engine_blank_point initializer to ensure any :before or :after hooks defined inside engines won't move the configuration initializers to other places.
2010-05-15 23:49:03 +02:00
Jeff Dean
6617d01893 Sending :id => nil to form helpers now properly omits the "id" html element [#4559 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 22:30:21 +02:00
José Valim
d6cbb27e7b Revert "Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options hash and make various Validators pass their (filtered) options."
Having a huge array to whitelist options is not the proper way to handle this case. This means that the ActiveModel::Errors object should know about the options given in *all* validators and break the extensibility added by the validators itself. If the intent is to whitelist options before sending them to I18n, each validator should clean its respective options instead of throwing the responsibility to the Errors object.

This reverts commit bc1c8d58ec45593acba614d1d0fecb49adef08ff.
2010-05-15 21:55:16 +02:00
José Valim
f055bc05d5 Optimize the code added in fa99de0bd054576336c9 2010-05-15 21:55:03 +02:00
Jeremy Kemper
c5537c1158 Ruby 1.9: fix invalid rack response in test 2010-05-15 11:25:56 -07:00
Jeff Kreeftmeijer
da90fe9466 make sure as is set before trying to build an #{as}_counter. [#2804 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-15 11:19:41 -07:00
Jeroen van Dijk
bc1c8d58ec Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options hash and make various Validators pass their (filtered) options.
This makes it possible to pass additional options through Validators to message
generation. E.g. plugin authors want to add validates_presence_of :foo, :format
=> "some format".

Also, cleanup the :default vs :message options confusion in ActiveModel
validation message generation.

Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in
favor of ActiveModel::Errors#add_on_blank(attributes, options).

Original patch by Sven Fuchs, some minor changes and has been changed to be applicable to master again

[#4057 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-15 11:17:58 -07:00
Santiago Pastorino
47c9a35506 Reset quoted_table_name after set_table_name [#4568 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2010-05-15 18:53:47 +01:00
Jeff Kreeftmeijer
fa99de0bd0 partial counters with :as [#2804 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-15 10:32:23 -07:00
Diego Algorta
3436fdfc12 Fix for get_ids when including a belongs_to association on a has_many association [#2896 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2010-05-15 16:53:59 +01:00
Anil Wadghule
2d84f24af5 Add tests for convenience methods #notice and #alert to flash.now [#4369 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 16:52:23 +02:00
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