aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/finder_respond_to_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Module#{define_method,alias_method,undef_method,remove_method} become public ↵Ryuta Kamizono2018-12-211-3/+3
| | | | | | since Ruby 2.5 https://bugs.ruby-lang.org/issues/14133
* Change the empty block style to have space inside of the blockRafael Mendonça França2018-09-251-1/+1
|
* Use respond_to test helpersDaniel Colson2018-01-251-6/+6
|
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fixed a bug in AR::Base#respond_to?Godfrey Chan2014-01-291-0/+5
| | | | | | | | | | | | Before: >> ActiveRecord::Base.respond_to?(:find_by_something) NoMethodError: undefined method `abstract_class?' for Object:Class After: >> ActiveRecord::Base.respond_to?(:find_by_something) => false
* Avoid compiling regexs in AR::Base.respond_to?John Hawthorn2013-08-211-0/+5
| | | | | Caches the patterns of ActiveRecord::DynamicMatchers in a class instance variable.
* Remove depreacted findersŁukasz Strzałkowski2013-06-281-40/+0
| | | | They were deprecated in 4.0, planned to remove in 4.1
* made dynamic finders alias_attribute awareMaximilian Schneider2012-06-221-0/+5
| | | | | previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute
* stop `to_s`ing method namesAkira Matsuda2012-06-061-2/+1
| | | | Module#methods are Symbols in Ruby >= 1.9
* Add dynamic find_or_create_by_{attribute}! method.Andrew White2012-03-121-0/+10
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Use better assertion methods for testingNeeraj Singh2010-05-191-11/+11
| | | | | | [#4645 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Ensure that respond_to? considers dynamic finder methods. Closes #11538. ↵Pratik Naik2008-04-061-0/+76
[floehopper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de