aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
Commit message (Collapse)AuthorAgeFilesLines
* Set default value to ActiveModel::Validator initializer attributeIrio Irineu Musskopf Junior2013-01-091-1/+1
| | | | Makes it easier to test its objects.
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-01-092-19/+1
|\ | | | | | | | | Conflicts: guides/source/getting_started.md
| * prefer american spelling of 'behavior'Gosha Arinich2013-01-071-1/+1
| |
| * Observers was extracted from Active Model as `rails-observers` gemAkira Matsuda2013-01-021-18/+0
| |
* | Reduce number of Strings a bitAkira Matsuda2013-01-072-3/+3
| |
* | Namespace HashWithIndifferentAccessAkira Matsuda2013-01-071-1/+1
|/
* Updated copyright notices for 2013Andrew Nesbitt2012-12-312-2/+2
|
* Add active_support/testing/autorunRafael Mendonça França2012-12-311-1/+1
| | | | | minitest/autorun load minitest/spec polluting the global namespace with the DSL that we don't want on Rails
* This change doesn't need a CHANGELOG entry.Rafael Mendonça França2012-12-261-5/+0
| | | | [ci skip]
* Add CHANGELOG entry for #8622Rafael Mendonça França2012-12-262-2/+7
|
* Revert the change at ActiveModel::Errors#add_on_blank and fix in theRafael Mendonça França2012-12-263-14/+8
| | | | | | | | | | | right place. The EachValidator#validate already handle :allow_blank and :allow_nil, correctly. Closes #8622. Fix #8621.
* Tests and fix for validates_presence of :allow_nil, :allow_blankColin Kelley2012-12-262-1/+41
| | | | | Conflicts: activemodel/lib/active_model/errors.rb
* chmod -x from non-script filesAkira Matsuda2012-12-242-0/+0
|
* Remove CHANGELOG entry for ActiveModel::Errors#add_on_presentRafael Mendonça França2012-12-211-5/+0
|
* Use :present as key for the absence validatior messageRafael Mendonça França2012-12-212-2/+2
|
* Remove ActiveModel::Errors#add_on_present method.Rafael Mendonça França2012-12-213-16/+3
| | | | | | | | We don't need to define a new method in ActiveMode::Errors for each validatior. See https://github.com/rails/rails/commit/d72a07f1d1478db9daed847eadb35bfd840674f6#commitcomment-2325333
* Fix Action Mailer changelog indenation to match other changelogsCarlos Antonio da Silva2012-12-191-0/+1
| | | | Also some minor improvements to other changelogs. [ci skip]
* Improve AMo changelog example to not rely on AR [ci skip]Carlos Antonio da Silva2012-12-191-4/+8
|
* Add `ActiveModel::Validations::AbsenceValidator`, a validator to check the ↵Roberto Vasquez Angel2012-12-155-0/+131
| | | | | | absence of attributes. Add `ActiveModel::Errors#add_on_present` method. Adds error messages to present attributes.
* Convert changelogs to 1.9 hash style and fix some formatting [ci skip]Carlos Antonio da Silva2012-12-141-1/+1
|
* Merge pull request #8510 from thedarkone/thread_safety_improvementsAaron Patterson2012-12-141-4/+5
|\ | | | | Thread safety improvements
| * Replace some global Hash usages with the new thread safe cache.thedarkone2012-12-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the changes: * Add thread_safe gem. * Use thread safe cache for digestor caching. * Replace manual synchronization with ThreadSafe::Cache in Relation::Delegation. * Replace @attribute_method_matchers_cache Hash with ThreadSafe::Cache. * Use TS::Cache to avoid the synchronisation overhead on listener retrieval. * Replace synchronisation with TS::Cache usage. * Use a preallocated array for performance/memory reasons. * Update the controllers cache to the new AS::Dependencies::ClassCache API. The original @controllers cache no longer makes much sense after @tenderlove's changes in 7b6bfe84f3 and f345e2380c. * Use TS::Cache in the connection pool to avoid locking overhead. * Use TS::Cache in ConnectionHandler.
* | Only call `in_time_zone` on Time or DateTime instancesAndrew White2012-12-111-1/+6
|/ | | | | Both String and Date now respond to in_time_zone so we need to check if the value is a Time or a DateTime.
* Revert "Omit directories from gemspec.files for RubyGems 2 compat."Jeremy Kemper2012-12-091-1/+1
| | | | | | Obviated by rubygems/rubygems@486ed83cc8e706069213c5d406122f4cfcca9e7f This reverts commit bb8923dee093b615615cdfb83b34d1b0bb254f25.
* Omit directories from gemspec.files for RubyGems 2 compat.Jeremy Kemper2012-12-081-1/+1
| | | | | | RG2 packager expects each spec.files path to be a file and bombs when it tries to tarball a dir. May revert if rubygems/rubygems#413 is accepted.
* Replace comments' non-breaking spaces with spacesclaudiob2012-12-043-6/+6
| | | | | | | | | | Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
* Actually test that ActiveModel::Errors#add defaults to :invalid.Renato Mascarenhas2012-12-011-1/+1
|
* Call `full_messages` instead of `to_a` in its spec.Renato Mascarenhas2012-12-011-2/+1
|
* Reset attributes should not report changes.Renato Mascarenhas2012-12-013-3/+9
| | | | | | | | | | | When resetting an attribute, you expect it to return to the state it was before any changes. Namely, this fixes this unexpected behavior: ~~~ruby model.name = "Bob" model.reset_name! model.name_changed? #=> true ~~~
* Simplify keys order test for as_json in Active ModelCarlos Antonio da Silva2012-11-301-4/+1
|
* Add CHANGELOG entries for the observes extractionRafael Mendonça França2012-11-291-0/+4
| | | | [ci skip]
* Remove observers and sweepersRafael Mendonça França2012-11-286-955/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* Specify type of singular association during serializationSteve Klabnik2012-11-283-3/+18
| | | | | | | | | | | | When serialising a class, specify the type of any singular associations, if necessary. Rails already correctly specifies the :type of any enumerable association (e.g. a has_many association), but made no attempt to do so for non-enumerables (e.g. a has_one association). We must specify the :type of any STI association. A has_one association to a class which uses single-table inheritance is an example of this type of association. Fixes #7471
* Merge pull request #7282 from xHire/validates_length_of_fixRafael Mendonça França2012-11-263-2/+57
|\ | | | | | | | | | | | | Length validation handles correctly nil. Fix #7180 Conflicts: activemodel/CHANGELOG.md
| * Length validation handles correctly nil. Fix #7180Michal Zima2012-11-263-2/+57
| | | | | | | | When nil or empty string are not allowed, they are not valid.
* | Merge pull request #8320 from senny/active_model_log_folderCarlos Antonio da Silva2012-11-261-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log output from activemodel's railtie_test directly to STDOUT. There's no logging going on here, but since we initialize the app, the logger is set and the folder is automatically created. With this change, the default logger is not created, so there is no logging folder anymore. Conflicts: activemodel/test/cases/railtie_test.rb
| * | log output from activemodel's railtie_test directly to STDOUTYves Senn2012-11-261-0/+1
| |/ | | | | | | | | after this patch, running the tests in activemodel will no longer create an untracked log/ folder inside of activemodel
* | Merge pull request #8312 from ↵Rafael Mendonça França2012-11-269-21/+14
|\ \ | | | | | | | | | | | | senny/make_active_model_parts_individually_loadable make sure that individual parts `ActiveModel` can be required by itself
| * | cleanup, removed dispensable `require` statements from `ActiveModel`Yves Senn2012-11-258-12/+5
| | |
| * | cleanup, remove broken whitespaceYves Senn2012-11-254-9/+9
| |/
* / Require active_model/railtie directly instead of rails/allCarlos Antonio da Silva2012-11-261-3/+3
|/ | | | Use Class.new with a block instead of tap to configure it.
* Use secure password min cost option in its own tests for a speed upCarlos Antonio da Silva2012-11-211-2/+10
| | | | Around 0.564359s => 0.092244s speed up in my machine.
* Merge pull request #8256 from nalwayaabhishek/masterCarlos Antonio da Silva2012-11-191-3/+3
|\ | | | | Displaying error message if validation fail in examples (p tag was missing)
| * displaying error message(p tag was missing) and adding output as comment Abhishek Nalwaya2012-11-191-3/+3
| |
* | Point user to strong_parameters as the new protection model [ci skip]Saulius Grigaliunas2012-11-181-4/+6
|/
* Initialize #min_cost to avoid warning in Ruby 2.0Carlos Antonio da Silva2012-11-171-2/+3
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-11-171-0/+4
|\ | | | | | | | | Conflicts: actionpack/lib/action_dispatch/routing/redirection.rb
| * add details on password confirmation used with has_secure_passwordDaniel Lopes2012-11-131-0/+4
| |
* | Use BCrypt's MIN_COST in the test environment for speedier testsTrevor Turk2012-11-145-2/+52
| |
* | Trivial documentation fix for ActiveModel::Naming comment.Dennis Taylor2012-11-091-2/+2
| |