aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #16336 from akshay-vishnoi/fix-testsRafael Mendonça França2014-07-292-24/+16
|\ | | | | Add missing test case for Array#to_sentence, collect all test cases for Object#to_param at one place and avoid repitition
| * Add missing test case for Array#to_sentence, collect all test cases for ↵Akshay Vishnoi2014-07-292-24/+16
|/ | | | Object#to_param at one place and avoid repitition
* Merge pull request #16334 from akshay-vishnoi/array-testsRafael Mendonça França2014-07-297-482/+495
|\ | | | | Move array test files under array
| * Move array test files under arrayAkshay Vishnoi2014-07-297-482/+495
| |
* | docs, cleanup mixed indents within `form_options_helper.rb` RDoc.Yves Senn2014-07-291-81/+81
| | | | | | | | | | | | | | [ci skip] This fixes the broken code block rendering and indents the examples within the parameter list.
* | Merge pull request #16332 from shizm/fix-docs-validates-uniqueness-ofRobin Dupret2014-07-291-1/+1
|\ \ | | | | | | [ci skip] fix doc typo for validates_uniqueness_of
| * | [ci skip] fix doc typo for validates_uniqueness_ofSatoru Yamasaki2014-07-291-1/+1
|/ /
* | Merge pull request #16328 from noinkling/template_password_confirmation_fixYves Senn2014-07-292-1/+6
|\ \ | | | | | | | | | Give password_confirmation div the "field" class in the scaffold generator "_form" partial
| * | Give password_confirmation div the "field" class in erb form templatenoinkling2014-07-291-1/+1
| | |
* | | Merge pull request #16148 from rails/fix_json_autoloadGodfrey Chan2014-07-293-3/+52
|\ \ \ | | | | | | | | Fix json autoload
| * | | Fixed a compatibility issue with the `Oj` gemGodfrey Chan2014-07-292-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Time#as_json`, `Date#as_json` and `DateTime#as_json` incorrectly depends on a delegation that is set up in `active_support/json/encoding`. We cannot simply require that file in `core_ext/object/json` because it would cause a circular dependency problem (see #12203 for background). We should instead rely on AS's autoload to load that file for us on-demand. To trigger autoload correctly, we need to reference the `AS::JSON::Encoding` constant instead of using the delegated version. Fixes #16131.
| * | | Added failing test case for #16131Godfrey Chan2014-07-291-0/+42
| |/ /
* / / Raise an exception when attachments are added after `mail` was called.Yves Senn2014-07-293-1/+62
|/ / | | | | | | | | | | | | | | | | Closes #16163 Adding attachments after a call to `mail` will result in invalid emails. This is related to the fact, that `mail` is making the required preparations before the email is ready to be sent. These change depending on your added attachments.
* | Merge pull request #15629 from akshay-vishnoi/test-to_paramRafael Mendonça França2014-07-284-66/+81
|\ \ | |/ |/| Define Hash#to_query and set Hash#to_param as alias to it; with test cases
| * Move to_param to to_query, also Improve testsAkshay Vishnoi2014-06-204-66/+81
| |
* | Merge pull request #15658 from akshay-vishnoi/object-testsRafael Mendonça França2014-07-283-65/+65
|\ \ | | | | | | Move object test files under object
| * | Move object test files under objectAkshay Vishnoi2014-07-293-65/+65
|/ /
* | Merge pull request #16326 from itsNikolay/remove_blank_linesRafael Mendonça França2014-07-288-8/+0
|\ \ | | | | | | remove blank lines at the start of the ActiveRecord files
| * | remove blank lines in the start of the ActiveRecord filesPonomarev Nikolay2014-07-298-8/+0
|/ /
* | remove the mounted? methodAaron Patterson2014-07-282-6/+2
| | | | | | | | | | we know the routes should not be "optimized" when mounting an application
* | remove some cachingAaron Patterson2014-07-281-2/+1
| | | | | | | | | | this caching doesn't increase performance, but does increase complexity. remove it for now and find better ways to speed up this code.
* | Merge pull request #16305 from tomkadwill/documented_change_tableRafael Mendonça França2014-07-281-1/+1
|\ \ | | | | | | Added documentation for change_table
| * | Added nodoc to change_tableTom Kadwill2014-07-281-1/+1
| | |
* | | Extract the transaction class to a local variableRafael Mendonça França2014-07-281-6/+2
| | |
* | | Merge pull request #16284 from arthurnn/transactionsRafael Mendonça França2014-07-284-62/+101
|\ \ \ | | | | | | | | | | | | Transactions refactoring
| * | | savepoint_name should return nil for non-savepoint transactionsArthur Neves2014-07-283-4/+27
| | | | | | | | | | | | | | | | Also add test to assets the savepoint name
| * | | Transactions refactoringArthur Neves2014-07-283-38/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a transaction manager per connection, so it can controls the connection responsibilities. Delegate transaction methods to transaction_manager
| * | | Remove finishing? method from transaction.Arthur Neves2014-07-242-24/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The finishing variable on the transaction object was a work-around for the savepoint name, so after a rollback/commit the savepoint could be released with the previous name. related: 9296e6939bcc786149a07dac334267c4035b623a 60c88e64e26682a954f7c8cd6669d409ffffcc8b
* | | | Fix typo and remove code block since present is not a method.Rafael Mendonça França2014-07-281-1/+1
| | | |
* | | | docs, clarify attribute query methods on numeric columns. Closes #16246.Yves Senn2014-07-281-0/+1
| | | | | | | | | | | | | | | | [ci skip]
* | | | Merge pull request #16303 from rajcybage/removing_masterYves Senn2014-07-281-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | remove empty unused method
| * | | | add comment to the empty each method for not removing it in futureRajarshi Das2014-07-261-1/+2
| | | | |
* | | | | Merge pull request #16297 from calebthompson/extract-iterator-methodRafael Mendonça França2014-07-281-10/+14
|\ \ \ \ \ | | | | | | | | | | | | Extract iterator method in AR::SchemaDumper
| * | | | | Extract iterator method in AR::SchemaDumperCaleb Thompson2014-07-251-10/+14
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gems which wish to tie into ActiveRecord::SchemaDumper need to duplicate this logic currently. [Foreigner] is one such example, as is a library I'm currently working on but which hasn't been released yet: def tables_with_foreign_keys(stream) tables_without_foreign_keys(stream) @connection.tables.sort.each do |table| next if ['schema_migrations', ignore_tables].flatten.any? do |ignored| case ignored when String; table == ignored when Regexp; table =~ ignored else raise StandardError, 'ActiveRecord::SchemaDumper.ignore_tables accepts an array of String and / or Regexp values.' end end foreign_keys(table, stream) end end [Foreigner]: https://github.com/matthuhiggins/foreigner/blob/master/lib/foreigner/schema_dumper.rb#L36-L43 Extract the skip logic to a method, making it much simpler to follow this same behavior in gems that are tying into the migration flow and let them dump only tables that aren't skipped without copying this block of code. The above code could then be simplified to: def tables_with_foreign_keys(stream) tables_without_foreign_keys(stream) @connection.tables.sort.each do |table| foreign_keys(table, stream) unless ignored?(table) end end It also, in my opinion, simplifies the logic on ActiveRecord's side, and clarifies the intent of the skip logic.
* | | | | Merge pull request #16295 from kenn/no_stacktrace_drop_taskRafael Mendonça França2014-07-282-0/+8
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | No verbose backtrace by db:drop when database does not exist.
| * | | | | No verbose backtrace by db:drop when database does not exist.Kenn Ejima2014-07-272-0/+8
| | | | | |
* | | | | | Merge pull request #16318 from zuhao/refactor_activerecord_adapter_testYves Senn2014-07-281-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | make `adapter_test` run order independently.
| * | | | | | Add where condition so select_one returns the correct record.Zuhao Wan2014-07-281-1/+1
| | | | | | |
* | | | | | | Merge pull request #16319 from Domon/fix-each-validator-exampleYves Senn2014-07-281-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fix example code of EachValidator [ci skip]
| * | | | | | Fix example code of `EachValidator` [ci skip]Chun-wei Kuo2014-07-281-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | We have to specify the `:title` option to really use the `TitleValidator` defined above.
* | | | | | Merge pull request #16315 from ↵Jeremy Kemper2014-07-272-7/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | eileencodes/fix-documentation-that-mentions-macro-instance-var Fix documentation for `@macro` and reflection types
| * | | | | | [ci skip] Fix documentation for @macro and reflection typeseileencodes2014-07-272-7/+10
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `@macro` doesn't exist anymore and these reflections are no longer AssociationReflections but their own types of reflections based on macro I updated the documentation to match the changes I made in #16089 and #16198. An `AssociationReflection` that had a `@macro` of `:has_many` now is a `HasManyReflection`
* | | | | | Merge pull request #16282 from davidbalbert/patch-1Guillermo Iguaran2014-07-271-1/+1
|\| | | | | | | | | | | | | | | | | Fix protect_from_forgery docs [ci-skip]
| * | | | | Fix protect_from_forgery docsDavid Albert2014-07-271-1/+1
|/ / / / /
* | | | | Fix that render layout should also be picked up by the template dependency ↵David Heinemeier Hansson2014-07-253-4/+29
| | | | | | | | | | | | | | | | | | | | tracker, but only half-ways. You can add that layout option on the same render call, and both templates should be added to the dependency tree. But thats going to require a more serious rework of the tracker. Please do help fix this part of it too. For now, render layout needs to be on its own line.
* | | | | Merge pull request #16290 from a3gis/masterZachary Scott2014-07-252-2/+2
|\ \ \ \ \ | |/ / / / |/| | | | [ci skip] Fix documentation of SQLite3Adapter.columns where SQLite3Column was removed in e781aa31fc52a7c696115302ef4d4e02bfd1533b
| * | | | Remove references to SQLite3Column from documentationa3gis2014-07-251-1/+1
| | | | |
| * | | | Fix documentation of SQlite3Adapter.columnsa3gis2014-07-251-1/+1
| | | | | | | | | | | | | | | As of https://github.com/rails/rails/commit/e781aa31fc52a7c696115302ef4d4e02bfd1533b SQLite3Column has been dropped.
* | | | | Merge pull request #16285 from noinkling/password_digest_docsRafael Mendonça França2014-07-252-2/+18
|\ \ \ \ \ | | | | | | | | | | | | Add password:digest information to scaffold generator help text
| * | | | | Additional clarification on password:digest in scaffold and model generator ↵noinkling2014-07-252-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | help [ci skip]