aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Merge pull request #19173 from robin850/rbx-buildRafael Mendonça França2015-03-0212-9/+34
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Improve the Rubinius build
| * | | | | | | Skip the failing tests on Rubinius for nowRobin Dupret2015-03-024-0/+9
| | | | | | | |
| * | | | | | | Wrap inline rescue with or-equal callsRobin Dupret2015-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, `rescue_from` doesn't work with strings on Rubinius because of rubinius/rubinius#3272.
| * | | | | | | Avoid Ruby versions check on RubiniusRobin Dupret2015-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rubinius is still targeting compliance with Ruby 2.1.0 but we are pretty close to a green build so let's avoid this check for the moment.
| * | | | | | | Test against the mail gem's edgeRobin Dupret2015-03-022-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The edge version ships with a patch that uses composition over inheritance for the Mail::PartsList object (see mikel/mail#782). Let's test Action Mailer against it to prevent eventual regressions and experience it. Moreover, this branch makes the Action Mailer suite green against Rubinius.
| * | | | | | | Add the platform-specific skip helpers to ActiveModelRobin Dupret2015-03-021-0/+9
| | | | | | | |
| * | | | | | | Avoid accurate assertions on error messagesRobin Dupret2015-03-022-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there are disparities between the raised error messages on the different implementations, let's avoid being too accurate.
| * | | | | | | Avoid parallelizing Action Pack's tests on RubiniusRobin Dupret2015-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the `ForkingExecutor` class seems to be pretty slow on Rubinius due to DRb (c.f. http://git.io/xIVg), let's avoid running tests with it on this platform. Also, the `parallelize_me!` call make the suite to output a bunch of errors due to rubinius/rubinius#2934 since there are thread-safety problems with autoloading.
* | | | | | | | Move Array#without from Grouping to Access concern and add dedicated test ↵David Heinemeier Hansson2015-03-023-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (relates to #19157)
* | | | | | | | tests, favor `drop_table` and `:if_exists` over raw SQL.Yves Senn2015-03-024-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've replaced most querues using DROP TABLE in our tests already. This patch replaces the last couple calls.
* | | | | | | | Merge pull request #19105 from amatsuda/array_takeSean Griffin2015-03-023-5/+18
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Preserve Array#take(n) behaviour of HasManyAssociation
| * | | | | | | | Preserve Array#take(n) behaviour of HasManyAssociationAkira Matsuda2015-02-283-5/+18
| | | | | | | | |
* | | | | | | | | Merge pull request #19077 from robin850/unknown-attribute-errorSean Griffin2015-03-0211-24/+30
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Move `UnknownAttributeError` to a more sane namespace
| * | | | | | | | | Follow-up to #10776Robin Dupret2015-02-2611-24/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name `ActiveModel::AttributeAssignment::UnknownAttributeError` is too implementation specific so let's move the constant directly under the ActiveModel namespace. Also since this constant used to be under the ActiveRecord namespace, to make the upgrade path easier, let's avoid raising the former constant when we deal with this error on the Active Record side.
* | | | | | | | | | Remove not needed .tapArthur Neves2015-03-021-1/+1
| | | | | | | | | |
* | | | | | | | | | Merge pull request #19172 from JuanitoFatas/doc/fix-typoRichard Schneeman2015-03-021-2/+2
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | [ci skip] Fix a typo for PostgreSQL text limit, GB instead of Gb.
| * | | | | | | | | | [ci skip] Fix a typo for PostgreSQL text limit, GB instead of Gb.Juanito Fatas2015-03-031-2/+2
| | |_|_|_|/ / / / / | |/| | | | | | | |
* | | | | | | | | | Make private methods privateArthur Neves2015-03-021-0/+2
| | | | | | | | | |
* | | | | | | | | | Remove !has_transactional_callbacks? checkArthur Neves2015-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only set the state on the record if that condition is `false` in the first place, so we dont need to call that again. Also that call is expensive, follow benchmark with before and after this change: ``` Calculating ------------------------------------- persisted? 15.272k i/100ms ------------------------------------------------- persisted? 350.119k (± 4.6%) i/s - 1.756M ``` ``` Calculating ------------------------------------- persisted? 25.988k i/100ms ------------------------------------------------- persisted? 1.294M (± 5.3%) i/s - 6.445M ``` (benchmark borrowed from 57d35b2bf9e48173a5f97ccff5e6897f0c46411f)
* | | | | | | | | | Merge pull request #19170 from ↵Carlos Antonio da Silva2015-03-021-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JuanitoFatas/doc/active_record/connection_adapters/abstract/schema_definitions.rb Clarify that t.references and t.belongs_to are interchangeable. [ci skip]
| * | | | | | | | | | Clarify that t.references and t.belongs_to are interchangeable. [ci skip]Juanito Fatas2015-03-021-1/+1
| |/ / / / / / / / /
* | | | | | | | | | call `sync_with_transaction_state` inside `persisted?` then check ivarsAaron Patterson2015-03-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directly calling `sync_with_transaction_state` is not fast, so if we call it once, we can improve the performance of the `persisted?` method. This is important because every call to `url_for(model)` will call `persisted?`, so we want that to be fast. Here is the benchmark: ```ruby require 'active_record' ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" ActiveRecord::Base.connection.instance_eval do create_table(:articles) end class Article < ActiveRecord::Base; end article = Article.new.tap(&:save!) Benchmark.ips do |x| x.report("persisted?") do article.persisted? end end ``` Before this patch: ``` $ bundle exec ruby -rbenchmark/ips persisted.rb Calculating ------------------------------------- persisted? 3.333k i/100ms ------------------------------------------------- persisted? 51.037k (± 8.2%) i/s - 253.308k ``` After: ``` $ bundle exec ruby -rbenchmark/ips persisted.rb Calculating ------------------------------------- persisted? 7.172k i/100ms ------------------------------------------------- persisted? 120.730k (± 5.1%) i/s - 602.448k ```
* | | | | | | | | | remove useless instance variableAaron Patterson2015-03-021-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | depth is always 0, so the index will always be false. No reason to create the instance variable if it isn't used
* | | | | | | | | | Merge pull request #19169 from hjoo/rake_restartEileen M. Uchitelle2015-03-021-1/+1
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Rake restart task no longer loads entire Rails environment when run
| * | | | | | | | | Rake restart task no longer loads entire Rails environment when run.Hyonjee Joo2015-03-021-1/+1
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The restart task does not need access to models or other classes and helpers from the application environment.
* | | | | | | | | Do not output in the consoleRafael Mendonça França2015-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Robin Dupret + Rafael Mendonça França]
* | | | | | | | | Merge pull request #19106 from teeceepee/patch-1Eileen M. Uchitelle2015-03-021-7/+8
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | | Improve guides [ci skip]
| * | | | | | | | Modify guides for a better sounding sentenceYu Haidong2015-03-021-3/+3
| | | | | | | | |
| * | | | | | | | Improve guidesYu Haidong2015-02-271-7/+8
| | | | | | | | |
* | | | | | | | | Merge pull request #19133 from davydovanton/update-doc-example-mail-block-formatRobin Dupret2015-03-021-1/+11
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | [ci skip] Add code example for MailHelper#block_format documentation
| * | | | | | | | | [ci skip] Add code example for MailHelper#block_format documentationAnton Davydov2015-03-021-1/+11
| | | | | | | | | |
* | | | | | | | | | Merge pull request #19168 from gsamokovarov/byebug-defaults-guideRobin Dupret2015-03-021-3/+3
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Nit pick the byebug settings guide for default values [ci skip]
| * | | | | | | | | | Nit pick the byebug settings guide for default values [ci skip]Genadi Samokovarov2015-03-021-3/+3
| | |_|_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #19097 we had a discussion where we decided to change `byebug` settings sections default part to actually say `defaults`.
* | | | | | | | | | Merge pull request #19097 from gsamokovarov/web-console-guideRobin Dupret2015-03-021-49/+58
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Web Console documentation for the upcoming 2.1 release [ci skip]
| * | | | | | | | | | Web Console documentation for the upcoming 2.1 release [ci skip]Genadi Samokovarov2015-03-021-49/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the upcoming 2.1 [web-console release], I have tweaked the existing documentation a bit. I tried to focus on the spawning console use case, because I think a lot of people overlook that. Tried to explain it as best as I can, however, my English and prose aren't my best skills :) If you guys can chime in and help me improve the wording, I would be extremely grateful. There has been some configuration default changes. For example, the whitelisted IPs always include IPv4 and IPv6 localhosts now and this wasn't the case in 2.0. I think a lot of people got bitten by it, that's why I changed it. I'm a bit confused on how to document this. Should I just document the latest version, I don't think I can expect all the people reading the guide to be on it. [web-console release]: https://github.com/rails/web-console/pull/110
* | | | | | | | | | | Merge pull request #19167 from limekin/masterArun Agrawal2015-03-021-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | On guides, correcting incorrect controller name used on routing.md.
| * | | | | | | | | | | Fixing incorrect class name used in an example.Kevin Jayanthan2015-03-021-1/+1
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | On "Controller Namespaces and Routing" section of the "Rails Routing from the Outside In" , the examples are using "AritclesController" as an example of a controller, to show different organizers. But on the line 232, it incorrectly uses "PostsController" instead of "AritclesController".
* | | | | | | | | | | Merge pull request #19163 from JuanitoFatas/feautre/enumerable-without-take-2Richard Schneeman2015-03-012-2/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Use include? instead of in? for Enumerable#without.
| * | | | | | | | | | | Use include? instead of in? for Enumerable#without.Juanito Fatas2015-03-022-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [egilburg]
* | | | | | | | | | | | Merge pull request #19159 from stephenminded/docs_fix_polymorphic_indexArthur Nogueira Neves2015-03-011-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | [docs fix] Composite index is actually [:imageable_type, :imageable_id]
| * | | | | | | | | | | | Composite index is [:imageable_type, :imageable_id] [ci skip]Steve Lounsbury2015-03-011-1/+1
| | | | | | | | | | | | |
* | | | | | | | | | | | | Move transaction code to transaction moduleArthur Neves2015-03-012-41/+41
| |/ / / / / / / / / / / |/| | | | | | | | | | |
* | | | | | | | | | | | Remove parent transaction stateArthur Neves2015-03-012-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As far as I can tell nobody is setting this variable.
* | | | | | | | | | | | Merge pull request #19161 from JuanitoFatas/fix/include-inclusionDavid Heinemeier Hansson2015-03-011-0/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Include object inclusion for enumerable test.
| * | | | | | | | | | | | Include object inclusion for enumerable test.Juanito Fatas2015-03-021-0/+1
|/ / / / / / / / / / / /
* | | | | | | | | | | | Merge pull request #19157 from todd/enumerable_withoutDavid Heinemeier Hansson2015-03-015-0/+46
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Add Enumerable#without
| * | | | | | | | | | | | Add Enumerable#withoutTodd Bealmear2015-03-015-0/+46
| | | | | | | | | | | | |
* | | | | | | | | | | | | remove useless conditionalAaron Patterson2015-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `@reflects_state[depth+1]` will always be nil because we haven't made a method call that would make it true yet.
* | | | | | | | | | | | | refactor `handle_model` to use private helper methods for generationAaron Patterson2015-03-011-8/+6
| | | | | | | | | | | | |
* | | | | | | | | | | | | drop allocations for string and class polymorphic routesAaron Patterson2015-03-011-3/+3
| | | | | | | | | | | | |