aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix #5797. Error calling dup method on AR model with serialized fieldkennyj2012-05-304-5/+15
|
* Unused variable warning removed.Arun Agrawal2012-05-301-1/+1
|
* More assert_match warnings fixed.Arun Agrawal2012-05-304-12/+12
|
* Warnings removed for "assert_match /".Arun Agrawal2012-05-301-20/+20
|
* Merge pull request #5843 from ↵José Valim2012-05-292-2/+7
|\ | | | | | | | | kuroda/translation_of_deeply_nested_model_attributes Fix human attribute_name to handle deeply nested attributes
| * Fix human attribute_name to handle deeply nested attributesTsutomu Kuroda2012-05-162-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | When a model nests another model that also nests yet another model using accepts_nested_attributes_for method, its Errors object can have an attribute name with "contacts.addresses.street" style. In this case, the dots within the namespace should be substituted with slashes so that we can provide the translation under the "activemodel.attributes.person/contacts/addresses.street" key. This commit is related to #3859.
* | Merge pull request #6546 from erichmenge/patch-as-jsonJeremy Kemper2012-05-292-9/+15
|\ \ | | | | | | True, False, and Nil should be represented in as_json as themselves.
| * | True, False, and Nil should be represented in as_json as themselves.Erich Menge2012-05-292-9/+15
|/ /
* | Merge pull request #6502 from rafmagana/guides_refactor_rakefileXavier Noria2012-05-293-22/+89
|\ \ | | | | | | [Guides] refactor rakefile to have a :guides namespace and a task that shows help
| * | [guides] fix reference to railties directory, guides are no longer thereRafael Magana2012-05-281-1/+1
| | |
| * | [guides] guides:generate:kindle is the new interface to generate .mobi file ↵Rafael Magana2012-05-283-18/+3
| | | | | | | | | | | | instead of using KINDLE=1
| * | [guides] get rid of any reference to the generator script since rake tasks ↵Rafael Magana2012-05-282-6/+4
| | | | | | | | | | | | are now the new interface
| * | [guides] update generator.rb to refer to guides:generate instead of ↵Rafael Magana2012-05-271-1/+1
| | | | | | | | | | | | generate_guides
| * | [guides] update guides guidelines with the new generation and validation ↵Rafael Magana2012-05-271-5/+23
| | | | | | | | | | | | rake tasks
| * | [guides] Add rake task to show help and make it the default oneRafael Magana2012-05-261-0/+50
| | |
| * | [guides] Add :guides namespace and :html and :kindle tasks to RakefileRafael Magana2012-05-261-9/+25
| | |
* | | copy edits the upgrading guideXavier Noria2012-05-291-9/+9
| | |
* | | Merge pull request #6518 from kennyj/fix_5847-4José Valim2012-05-2911-2/+83
|\ \ \ | | | | | | | | (Try again) Fix #5847 and #4045.
| * | | Fix #5847 and #4045 on master.kennyj2012-05-301-0/+2
| | | |
| * | | Use runner hook to load ActiveRecord::Base.kennyj2012-05-301-0/+4
| | | |
| * | | Add support runner hook.kennyj2012-05-296-0/+53
| | | |
| * | | SchemaMigration should be loaded lazily.kennyj2012-05-293-2/+1
| | | |
| * | | Add a testcase for #5847.kennyj2012-05-291-0/+23
|/ / /
* | | Merge pull request #6535 from arunagw/jruby_module_testCarlos Antonio da Silva2012-05-291-1/+1
|\ \ \ | | | | | | | | JRuby return different Array for module contents.
| * | | JRuby return different Array for module contents.Arun Agrawal2012-05-291-1/+1
|/ / / | | | | | | | | | | | | Test was failing against JRuby. It loads like [Constant3 Constant1]
* | | Merge pull request #6525 from freerange/minitest-passthrough-exceptionsJosé Valim2012-05-292-8/+62
|\ \ \ | | | | | | | | Exceptions like Interrupt & NoMemoryError should not be rescued in tests.
| * | | Avoid dependency on MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS.James Mead2012-05-291-2/+10
| | | |
| * | | Exceptions like Interrupt should not be rescued.James Mead2012-05-282-8/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neither Test::Unit nor MiniTest rescue exceptions like Interrupt or NoMemoryError, but ActiveSupport::Testing::SetupAndTeardown#run which overrides MiniTest::Unit::TestCase#run rescues them. Rescuing an Interrupt exception is annoying, because it means when you are running a lot of tests e.g. when running one of the rake test tasks, you cannot break out using ctrl-C. Rescuing exceptions like NoMemoryError is foolish, because the most sensible thing to happen is for the process to terminate as soon as possible. This solution probably needs some finessing e.g. I'm not clear whether the assumption is that only MiniTest is supported. Also early versions of MiniTest did not have this behaviour. However, hopefully it's a start. Integrating with Test::Unit & MiniTest has always been a pain. It would be great if both of them provided sensible extension points for the kind of things that both Rails and Mocha want to do.
* | | | Merge pull request #6528 from frodsan/update_hash_syntax_gemfile_templateJosé Valim2012-05-291-1/+1
|\ \ \ \ | | | | | | | | | | update Gemfile template to 1.9 hash syntax
| * | | | update Gemfile template to 1.9 hash syntaxFrancesco Rodriguez2012-05-291-1/+1
|/ / / /
* | | | Merge pull request #6526 from appfolio/decoupling_activesupport_from_actionivewCarlos Antonio da Silva2012-05-282-4/+44
|\ \ \ \ | | | | | | | | | | Decoupling ActiveSupport from ActionView
| * | | | decoupling activesupport performance testing from actionview and adding testsAndrew Mutz2012-05-282-4/+44
|/ / / /
* | | | Merge pull request #6527 from frodsan/add_test_to_delete_by_fixnum_or_stringCarlos Antonio da Silva2012-05-281-0/+20
|\ \ \ \ | | | | | | | | | | Add tests to delete by fixnum or string id with has many through associations
| * | | | Add tests to delete by fixnum or string id with has many through associationsFrancesco Rodriguez2012-05-281-0/+20
|/ / / /
* | | | Add note about CollectionAssociation#delete change to upgrading guide [ci skip]Carlos Antonio da Silva2012-05-291-0/+4
| | | |
* | | | Fix failing build related to change in CollectionAssociation#deleteCarlos Antonio da Silva2012-05-291-1/+1
| | | | | | | | | | | | | | | | Merge commit 6f1d9d00ffd9d411b2bd488da4eb92b7e2fd972e
* | | | Review requires from number helperCarlos Antonio da Silva2012-05-283-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of these requires are now only necessary in ActiveSupport::NumberHelper. Add hash/keys require due to symbolize_keys usage in number helpers. Also remove some whitespaces. Closes #6414
* | | | Yield only one argument instead of splatting.Carlos Antonio da Silva2012-05-282-2/+9
| | | | | | | | | | | | | | | | Add Changelog entry. Closes #4003
* | | | Allow blocks for count with ActiveRecord::Relation. Document and test that ↵chrisfinne2012-05-282-3/+30
| | | | | | | | | | | | | | | | sum allows blocks
* | | | Merge pull request #6511 from frodsan/add_fixnum_string_support_for_deleteCarlos Antonio da Silva2012-05-284-3/+57
|\ \ \ \ | | | | | | | | | | Add support for CollectionAssociation#delete by Fixnum or String
| * | | | Add support for CollectionAssociation#delete by Fixnum or StringFrancesco Rodriguez2012-05-284-3/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found the next issue between CollectionAssociation `delete` and `destroy`. class Person < ActiveRecord::Base has_many :pets end person.pets.destroy(1) # => OK, returns the destroyed object person.pets.destroy("2") # => OK, returns the destroyed object person.pets.delete(1) # => ActiveRecord::AssociationTypeMismatch person.pets.delete("2") # => ActiveRecord::AssociationTypeMismatch Adding support for deleting with a fixnum or string like `destroy` method.
* | | | | Parse float value only once in number helpersCarlos Antonio da Silva2012-05-281-11/+11
|/ / / / | | | | | | | | | | | | | | | | Refactor number helpers output with safety handling to call float parsing only once. Also remove 'erb' require.
* | | | Merge pull request #6522 from lest/patch-1José Valim2012-05-283-5/+1
|\ \ \ \ | |/ / / |/| | | ActiveSupport require and dependencies
| * | | make AS::Multibyte::Chars work w/o multibyte core extSergey Nartimov2012-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use ActiveSupport::Multibyte::Chars.new instead of String#mb_chars. It allows to use ActiveSupport::Multibyte::Chars without requiring String multibyte core extension.
| * | | remove unnecessary requireSergey Nartimov2012-05-282-4/+0
|/ / / | | | | | | | | | | | | AS::Multibyte are no longer required by access and filters string core extensions.
* | | Merge pull request #6517 from purcell/validates-false-valueJosé Valim2012-05-283-0/+8
|\ \ \ | | | | | | | | Don't enable validations when passing false hash values to ActiveModel.validates
| * | | Don't enable validations when passing false hash values to ActiveModel.validatesSteve Purcell2012-05-283-0/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a falsey option value for a validator currently causes that validator to be enabled, just like "true": ActiveModel.validates :foo, :presence => false This is rather counterintuitive, and makes it inconvenient to wrap `validates` in methods which may conditionally enable different validators. As an example, one is currently forced to write: def has_slug(source_field, options={:unique => true}) slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? } before_validation slugger validations = { :presence => true, :slug => true } if options[:unique] validations[:uniqueness] = true end validates :slug, validations end because the following reasonable-looking alternative fails to work as expected: def has_slug(source_field, options={:unique => true}) slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? } before_validation slugger validates :slug, :presence => true, :slug => true, :uniqueness => options[:unique] end (This commit includes a test, and all activemodel and activerecord tests pass as before.)
* | | Merge pull request #6512 from jaredbeck/fix_number_to_currency_neg_formatJosé Valim2012-05-282-1/+3
|\ \ \ | | | | | | | | Fix handling of negative zero in number_to_currency
| * | | Fix handling of negative zero in number_to_currencyJared Beck2012-05-282-1/+3
|/ / /
* | | Merge pull request #6315 from ↵José Valim2012-05-2813-287/+1536
|\ \ \ | | | | | | | | | | | | | | | | appfolio/moving_number_helper_methods_to_active_support Moving number helper from ActionView to Active Support