Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add documentation for find_or_create_by_{attribute}! method. | Andrew White | 2012-03-12 | 1 | -0/+2 |
| | |||||
* | Fixed a slightly misleading equivalent SQL code on the 3.2 query interface. | Swanand Pagnis | 2012-03-05 | 1 | -1/+1 |
| | |||||
* | document the AR none method [ci skip] | Vijay Dev | 2012-02-01 | 1 | -0/+24 |
| | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-02-01 | 1 | -5/+5 |
|\ | |||||
| * | Improve readonly examples and optimistic locking docs | Carlos Antonio da Silva | 2012-01-31 | 1 | -5/+5 |
| | | | | | | | | | | | | | | | | | | * Relation#order can receive order attributes as different arguments, add example; * Readonly does not handle deletion of records, only modification; * locking_version column does not need to default to 0, Rails handles nil values; * Change references from "set_locking_column" to "self.locking_column". | ||||
* | | disable automatic explain if there is no logger [closes #4671] | Xavier Noria | 2012-01-26 | 1 | -0/+3 |
|/ | |||||
* | fix some examples - method names can't start with a number | Vijay Dev | 2012-01-24 | 1 | -5/+5 |
| | |||||
* | Add ActiveRecord::Base#with_lock | Olek Janiszewski | 2012-01-18 | 1 | -0/+11 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a `with_lock` method to ActiveRecord objects, which starts a transaction, locks the object (pessimistically) and yields to the block. The method takes one (optional) parameter and passes it to `lock!`. Before: class Order < ActiveRecord::Base def cancel! transaction do lock! # ... cancelling logic end end end After: class Order < ActiveRecord::Base def cancel! with_lock do # ... cancelling logic end end end | ||||
* | [docs] Added missing "}" fixes #4126 | Arun Agrawal | 2011-12-22 | 1 | -1/+1 |
| | |||||
* | removes the convenience instance version of AR::Base.silence_auto_explain | Xavier Noria | 2011-12-03 | 1 | -3/+2 |
| | | | | | | | Rationale: As discussed with José and Jon, this convenience shortcut is not clearly justified and it could let the user thing the disabled EXPLAINs are related to the model instance rather than being globally disabled. | ||||
* | fix a typo in query guide | Vijay Dev | 2011-12-03 | 1 | -1/+1 |
| | |||||
* | two small details from the previous patch | Xavier Noria | 2011-12-02 | 1 | -1/+1 |
| | |||||
* | implements AR::Base(.|#)silence_auto_explain | Xavier Noria | 2011-12-02 | 1 | -0/+37 |
| | |||||
* | expand on pluck docs | Vijay Dev | 2011-12-01 | 1 | -3/+18 |
| | |||||
* | ActiveRecord::Relation#pluck method | Bogdan Gusiev | 2011-11-30 | 1 | -0/+9 |
| | |||||
* | finders guide: adds some pointers to help users interpret the output of EXPLAIN | Xavier Noria | 2011-11-25 | 1 | -0/+11 |
| | |||||
* | add the query to AR::Relation#explain output | Xavier Noria | 2011-11-25 | 1 | -0/+5 |
| | | | | | | | Rationale: this is more readable if serveral queries are involved in one call. Also, it will be possible to let AR log EXPLAINs automatically in production mode, where queries are not even around. | ||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2011-11-08 | 1 | -10/+10 |
|\ | | | | | | | | | Conflicts: railties/guides/source/active_record_querying.textile | ||||
| * | fix markups for plus in AR guide | Vijay Dev | 2011-11-06 | 1 | -10/+10 |
| | | |||||
* | | adds trailing +s to the output of EXPLAIN for MySQL | Xavier Noria | 2011-11-07 | 1 | -6/+6 |
|/ | |||||
* | implements AR::Relation#explain | Xavier Noria | 2011-11-05 | 1 | -0/+65 |
| | | | | | | | | | | | | | | | | | | | This is a first implementation, EXPLAIN is highly dependent on the database and I have made some compromises. On one hand, the method allows you to run the most common EXPLAIN and that's it. If you want EXPLAIN ANALYZE in PostgreSQL you need to do it by hand. On the other hand, I've tried to construct a string as close as possible to the ones built by the respective shells. The rationale is that IMO the user should feel at home with the output and recognize it at first sight. Per database. I don't know whether this implementation is going to work well. Let's see whether people like it. | ||||
* | Add ActiveRecord::Relation#uniq for toggling DISTINCT in the SQL query | Jon Leighton | 2011-11-05 | 1 | -4/+20 |
| | |||||
* | quoting 'and' to make it more distinct. | Craig Monson | 2011-10-12 | 1 | -1/+1 |
| | |||||
* | Heavy copy editing of the find_each and find_in_batches section | mhutchin | 2011-10-11 | 1 | -26/+34 |
| | |||||
* | Undid previous change which violated the convention regarding output (use "# ↵ | Manuel Menezes de Sequeira | 2011-10-06 | 1 | -13/+13 |
| | | | | =>") used in these guides. Corrected typo in previous correction. (Thanks for pointing this out, vijaydev.) | ||||
* | Some small corrections and improvements to the text. | Manuel Menezes de Sequeira | 2011-10-05 | 1 | -30/+32 |
| | |||||
* | Corrected a typo. | Michael Hutchinson | 2011-09-27 | 1 | -1/+1 |
| | |||||
* | No more changelogs inside guides | Vijay Dev | 2011-09-15 | 1 | -9/+0 |
| | |||||
* | change first_or_new to first_or_initialize as per 11870117, and some edits | Vijay Dev | 2011-09-14 | 1 | -10/+12 |
| | |||||
* | Merge pull request #2757 from andmej/first_or_create_pull_request | Jon Leighton | 2011-09-08 | 1 | -7/+68 |
|\ | | | | | Add first_or_create family of methods to Active Record | ||||
| * | Adding `first_or_new` documentation to the AR Querying guide. | Nicolas Hock Isaza | 2011-08-30 | 1 | -1/+1 |
| | | |||||
| * | Adding first_or_create, first_or_create!, first_or_new and first_or_build to ↵ | Andrés Mejía | 2011-08-30 | 1 | -7/+68 |
| | | | | | | | | | | | | | | | | | | | | Active Record. This let's you write things like: User.where(:first_name => "Scarlett").first_or_create!(:last_name => "Johansson", :hot => true) Related to #2420. | ||||
* | | some of the changes for validation earlier reverted from d20281a | Vijay Dev | 2011-09-03 | 1 | -2/+2 |
|/ | |||||
* | fixes generation of the AR querying guide | Xavier Noria | 2011-08-17 | 1 | -2/+2 |
| | |||||
* | document the change in edge rails which makes a more strict check on the ↵ | Vijay Dev | 2011-07-23 | 1 | -0/+1 |
| | | | | arity of the dynamic finders | ||||
* | Updated active_record_querying.textile: intro paragraph of 'Conditions' to ↵ | Christopher Scott Hernandez | 2011-07-08 | 1 | -1/+1 |
| | | | | change 'find method' to 'where method' | ||||
* | correct invalid HAVING query | Akira Matsuda | 2011-06-29 | 1 | -3/+3 |
| | | | | | * GROUP BY value must appear in SELECT clause * ("created_at < ?", 1.month.ago) wasn't a very good example for HAVING. you'd better use WHERE for such a simple condition | ||||
* | correct invalid GROUP BY query | Akira Matsuda | 2011-06-29 | 1 | -2/+2 |
| | | | | GROUP BY value must appear in SELECT clause | ||||
* | minor indentation fixes on a6293ff | Vijay Dev | 2011-06-26 | 1 | -10/+10 |
| | |||||
* | Update changelog for querying guide | Ryan Bigg | 2011-06-26 | 1 | -1/+2 |
| | |||||
* | Querying guide: add mention of scoped, unscoped and default_scope to ↵ | Ryan Bigg | 2011-06-26 | 1 | -0/+41 |
| | | | | querying guide | ||||
* | document Active Record's reverse_order method | Vijay Dev | 2011-06-20 | 1 | -0/+27 |
| | |||||
* | Fix incorrect description of the returned results. | Ben Orenstein | 2011-05-27 | 1 | -2/+2 |
| | |||||
* | Copy edits 64148ab96b47a9904fdd839bc69971b4e156bb04 (previous commit). ↵ | Ben Orenstein | 2011-05-26 | 1 | -1/+1 |
| | | | | Please squash at will. | ||||
* | Improve 'Joining Tables' section with additional examples and explanation. | Ben Orenstein | 2011-05-26 | 1 | -1/+29 |
| | |||||
* | Don't you lie to me! | Ben Orenstein | 2011-05-26 | 1 | -2/+2 |
| | |||||
* | document the reorder method(fb215110401c70cfc7013c6e2ad5753fa4e374e9) | Vijay Dev | 2011-04-28 | 1 | -4/+31 |
| | |||||
* | Exception got moved to ActiveModel with Rails 3 | Eric Anderson | 2011-04-20 | 1 | -1/+1 |
| | |||||
* | Remove extra whitespaces from guides | Sebastian Martinez | 2011-04-14 | 1 | -2/+2 |
| | |||||
* | Making colon usage consistent | Matt Duncan | 2011-04-13 | 1 | -1/+1 |
| |