Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [Active Record] require => require_relative | Akira Matsuda | 2017-10-21 | 1 | -5/+5 |
| | | | | This basically reverts 9d4f79d3d394edb74fa2192e5d9ad7b09ce50c6d | ||||
* | Use frozen-string-literal in ActiveRecord | Kir Shatrov | 2017-07-19 | 1 | -0/+2 |
| | |||||
* | [Active Record] require => require_relative | Akira Matsuda | 2017-07-01 | 1 | -5/+5 |
| | |||||
* | Fix Rubocop violations and fix documentation visibility | Rafael Mendonça França | 2016-12-28 | 1 | -2/+2 |
| | | | | | | Some methods were added to public API in 5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of the public API. | ||||
* | Privatize unneededly protected methods in Active Record | Akira Matsuda | 2016-12-24 | 1 | -4/+4 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -3/+3 |
| | |||||
* | Fix grammar `a` to `an` [ci skip] | Ryuta Kamizono | 2016-02-13 | 1 | -1/+1 |
| | |||||
* | applies new doc guidelines to Active Record. | Yves Senn | 2015-10-14 | 1 | -13/+14 |
| | | | | | | | | | | | | | | | | | | | The focus of this change is to make the API more accessible. References to method and classes should be linked to make it easy to navigate around. This patch makes exzessiv use of `rdoc-ref:` to provide more readable docs. This makes it possible to document `ActiveRecord::Base#save` even though the method is within a separate module `ActiveRecord::Persistence`. The goal here is to bring the API closer to the actual code that you would write. This commit only deals with Active Record. The other gems will be updated accordingly but in different commits. The pass through Active Record is not completely finished yet. A follow up commit will change the spots I haven't yet had the time to update. /cc @fxn | ||||
* | Merge pull request #21535 from dmitry/feature/validate-multiple-contexts | Rafael Mendonça França | 2015-09-08 | 1 | -1/+5 |
|\ | | | | | Validate multiple contexts on `valid?` and `invalid?` at once | ||||
| * | Validate multiple contexts on `valid?` and `invalid?` at once. | Dmitry Polushkin | 2015-09-07 | 1 | -1/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: ```ruby class Person include ActiveModel::Validations attr_reader :name, :title validates_presence_of :name, on: :create validates_presence_of :title, on: :update end person = Person.new person.valid?([:create, :update]) # => true person.errors.messages # => {:name=>["can't be blank"], :title=>["can't be blank"]} ``` | ||||
| * | Revert "Merge pull request #21069 from ↵ | Rafael Mendonça França | 2015-09-07 | 1 | -5/+1 |
| | | | | | | | | | | | | | | | | | | dmitry/feature/validate-multiple-contexts-at-once" This reverts commit 51dd2588433457960cca592d5b5dac6e0537feac, reversing changes made to ecb4e4b21b3222b823fa24d4a0598b1f2f63ecfb. This broke Active Record tests | ||||
| * | Validate multiple contexts on `valid?` and `invalid?` at once. | Dmitry Polushkin | 2015-07-30 | 1 | -1/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: ```ruby class Person include ActiveModel::Validations attr_reader :name, :title validates_presence_of :name, on: :create validates_presence_of :title, on: :update end person = Person.new person.valid?([:create, :update]) # => true person.errors.messages # => {:name=>["can't be blank"], :title=>["can't be blank"]} ``` | ||||
* | | Make ActiveRecordException descendants args optional | Pavel Pravosud | 2015-09-07 | 1 | -4/+10 |
|/ | | | | | | This change allows to instantiate all ActiveRecordError descendant execption classes without arguments, which might be useful in testing and is far less surprising than mandatory arguments. | ||||
* | AR absence validator respects `marked_for_destruction?`. Closes #20449. | Yves Senn | 2015-06-22 | 1 | -0/+1 |
| | | | | Associated objects that were marked for destruction are considered absent. | ||||
* | Move the `validate!` method to `ActiveModel::Validations`. | Lucas Mazza | 2015-02-20 | 1 | -14/+2 |
| | |||||
* | AR specific length validator to respect `marked_for_destruction`. | Yves Senn | 2014-12-30 | 1 | -0/+1 |
| | | | | | | | | Closes #7247. Conflicts: activerecord/CHANGELOG.md activerecord/test/models/owner.rb | ||||
* | various error classes: added newlines & removed :nodoc: flag from public ↵ | Recursive Madman | 2014-11-26 | 1 | -3/+4 |
| | | | | attribute. | ||||
* | Moved #create! method from Validations to Persistence module | Bogdan Gusiev | 2014-08-05 | 1 | -15/+0 |
| | |||||
* | Add AR::Base#validate! method | Bogdan Gusiev | 2014-06-23 | 1 | -1/+17 |
| | | | | | Acts same as valid? but raises AR::RecordInvalid exception if validation fails | ||||
* | ActiveRecord/ActiveModel '#validate' alias for 'valid?' | Henrik Nyh | 2014-03-27 | 1 | -0/+4 |
| | | | | | | | | It's unintuitive to call '#valid?' when you want to run validations but don't care about the return value. The alias in ActiveRecord isn't strictly necessary (the ActiveModel alias is still in effect), but it clarifies. | ||||
* | drop variable assignment in validations | Vipul A M | 2013-03-27 | 1 | -2/+1 |
| | |||||
* | Fix syntax error with no US-ASCII char | Rafael Mendonça França | 2012-09-28 | 1 | -1/+1 |
| | |||||
* | update AR::Validations documentation [ci skip] | Francesco Rodriguez | 2012-09-22 | 1 | -11/+12 |
| | |||||
* | Remove mass_assignment_options from ActiveRecord | Guillermo Iguaran | 2012-09-16 | 1 | -3/+3 |
| | |||||
* | AR has a subclass of AM:PresenceValidator. | Brent Wheeldon & Nick Monje | 2012-07-20 | 1 | -0/+1 |
| | | | | | | | This allows us to mark the parent object as invalid if all associated objects in a presence validated association are marked for destruction. See: https://github.com/rails/rails/issues/6812 | ||||
* | Allow translations of activerecord.errors.messages.record_invalid to be ↵ | Christopher Dell | 2012-03-05 | 1 | -1/+1 |
| | | | | looked up in errors.messages.record_invalid | ||||
* | Remove extra white spaces on ActiveRecord docs. | Sebastian Martinez | 2011-05-23 | 1 | -1/+1 |
| | |||||
* | updated AR#create! to accept an options hash so the mass-assignment security ↵ | Josh Kalderimis | 2011-05-12 | 1 | -3/+3 |
| | | | | role can be passed in, also updated the Changelog to mention the change to some of the AR method signatures. | ||||
* | Better formatting here | Sebastian Martinez | 2011-04-24 | 1 | -3/+3 |
| | |||||
* | copy-edits 8d96b89 | Xavier Noria | 2011-02-21 | 1 | -7/+7 |
| | |||||
* | Typo: fixing the the | Nicholas Rowe | 2011-02-19 | 1 | -1/+1 |
| | |||||
* | Clarification of ActiveRecord ActiveModel validation documentation | Peer Allan | 2011-02-18 | 1 | -1/+15 |
| | |||||
* | ActiveRecord#save(false) is now deprecated, now it is save(:validate => false) | Jaime Iniesta | 2011-01-18 | 1 | -1/+1 |
| | |||||
* | Partialy revert f1c13b0dd7b22b5f6289ca1a09f1d7a8c7c8584b | José Valim | 2010-11-28 | 1 | -1/+1 |
| | |||||
* | use persisted? instead of new_record? wherever possible | David Chelimsky | 2010-11-09 | 1 | -1/+1 |
| | | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Refactor AR validations a bit | Carlos Antonio da Silva | 2010-09-06 | 1 | -5/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Cleanup deprecation warnings in active record | Carlos Antonio da Silva | 2010-09-06 | 1 | -12/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Merge remote branch 'rails/master' | Xavier Noria | 2010-06-20 | 1 | -2/+2 |
|\ | | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb | ||||
| * | moving before_validation and after_validation functionality from ↵ | Neeraj Singh | 2010-06-19 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | ActiveRecord to ActiveModel [#4653 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | | Adds title to the rest of the files in activerecord/lib | Rizwan Reza | 2010-06-16 | 1 | -0/+3 |
|/ | |||||
* | Remove undocumented save_without_validation! | Pratik Naik | 2010-05-11 | 1 | -4/+0 |
| | |||||
* | Succint save definition | Pratik Naik | 2010-05-11 | 1 | -4/+2 |
| | |||||
* | Make sure valid? preceives the context as in ActiveModel API (ht: Carlos ↵ | José Valim | 2010-05-10 | 1 | -25/+22 |
| | | | | Antonio) | ||||
* | eliminate alias_method_chain from ActiveRecord | wycats | 2010-05-09 | 1 | -41/+30 |
| | |||||
* | updated AR to work with the AMo model validation changes | Josh Kalderimis | 2010-05-08 | 1 | -1/+5 |
| | |||||
* | Drop AR I18n deprecation and simple use errors.messages as fallback. | José Valim | 2010-01-30 | 1 | -2/+2 |
| | |||||
* | save(false) is gone, use save(:validate => false) instead. | José Valim | 2010-01-17 | 1 | -1/+11 |
| | |||||
* | Errors messages are now moved from :activerecord.errors to simply :errors on ↵ | José Valim | 2010-01-07 | 1 | -1/+1 |
| | | | | I18n yml files. | ||||
* | Get rid of DeprecatedCallbacks in ActiveRecord::Associations and finally ↵ | José Valim | 2009-12-30 | 1 | -2/+0 |
| | | | | remove it. | ||||
* | Integer#even? and Integer#odd? are not needed for Ruby >= 1.8.7 | Xavier Noria | 2009-11-09 | 1 | -2/+0 |
| |