- 13 1月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 04 1月, 2014 1 次提交
-
-
由 T.J. Schuck 提交于
-
- 04 10月, 2013 1 次提交
-
-
由 Prem Sichanugrist 提交于
Related issue: #11939, #12084
-
- 02 4月, 2013 1 次提交
-
-
由 Nate Berkopec 提交于
-
- 18 3月, 2013 1 次提交
-
-
由 Takehiro Adachi 提交于
These tests should be in inheritance_test.rb since its testing a feature which is implemented in inheritance.rb
-
- 11 3月, 2013 1 次提交
-
-
由 Takehiro Adachi 提交于
assertion for https://github.com/rails/rails/blob/ad624345e54bd20802de67b2b5c9ef29ecf5 d5f4/activerecord/lib/active_record/inheritance.rb#L32
-
- 06 3月, 2013 1 次提交
-
-
由 Dmitry Vorotilin 提交于
It cannot find subclass because all classes are loaded automatically when it needs.
-
- 29 11月, 2012 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Jason Rush 提交于
Allows you to do BaseClass.new(:type => "SubClass") as well as parent.children.build(:type => "SubClass") or parent.build_child to initialize an STI subclass. Ensures that the class name is a valid class and that it is in the ancestors of the super class that the association is expecting.
-
- 26 10月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
-
- 04 9月, 2012 2 次提交
-
-
由 Yves Senn 提交于
All tests with a custom inheritance_column use the `Vegtable` model. The field ruby_type on the Company models is no longer needed
-
由 Yves Senn 提交于
previously the tests with and without a custom `inheritance_column` used the same models. Since the model then has both fields this can lead to false positives.
-
- 03 9月, 2012 1 次提交
-
-
由 Yves Senn 提交于
I had to create a new table because I needed an STI table, which does not have both a "type" and a "custom_type" the test fails with: 1) Error: test_alt_becomes_works_with_sti(InheritanceTest): NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber"> /Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing' /Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing' /Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes' test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti' test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti'
-
- 03 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
-
- 28 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
-
- 27 7月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
-
由 beerlington 提交于
Moved logic from class_of_active_record_descendant(class) to the base_class method. This method was confusing because it required an argument, but that argument was 'self'. Moved base_class tests to inheritance_test.rb and added some test coverage for some untested cases.
-
- 27 4月, 2012 4 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 29 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base.
-
- 30 11月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 07 6月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 05 6月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Refactor Active Record test connection setup. Please see the 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.
-
- 01 3月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 08 1月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 26 12月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 25 12月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 24 11月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 01 10月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 29 6月, 2010 1 次提交
-
-
由 José Valim 提交于
Add scoping and unscoped as the syntax to replace the old with_scope and with_exclusive_scope. A few examples: * with_scope now should be scoping: Before: Comment.with_scope(:find => { :conditions => { :post_id => 1 } }) do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end After: Comment.where(:post_id => 1).scoping do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end * with_exclusive_scope now should be unscoped: class Post < ActiveRecord::Base default_scope :published => true end Post.all #=> SELECT * FROM posts WHERE published = true Before: Post.with_exclusive_scope do Post.all #=> SELECT * FROM posts end After: Post.unscoped do Post.all #=> SELECT * FROM posts end Notice you can also use unscoped without a block and it will return an anonymous scope with default_scope values: Post.unscoped.all #=> SELECT * FROM posts
-
- 20 5月, 2010 1 次提交
-
-
由 Neeraj Singh 提交于
[#4652 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 04 1月, 2010 1 次提交
-
-
由 David Heinemeier Hansson 提交于
Changed ActiveRecord::Base.store_full_sti_class to be true by default reflecting the previously announced Rails 3 default [DHH]
-
- 07 8月, 2009 1 次提交
-
-
由 Raimonds Simanovskis 提交于
-
- 01 7月, 2009 1 次提交
-
-
由 Pratik Naik 提交于
Revert "Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question.
-
- 23 6月, 2009 1 次提交
-
-
Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e. The tests do not pass for postgresql.
-
- 22 6月, 2009 1 次提交
-
-
由 Patrick Joyce 提交于
Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
- 30 4月, 2009 1 次提交
-
-
由 Emilio Tagua 提交于
Implemented other methods in AR::Base with Arel support.
-
- 09 3月, 2009 1 次提交
-
-
由 Jeremy Kemper 提交于
[#1617 state:resolved]
-