aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* remove_duplicate_results! should be protectedNeeraj Singh2013-04-101-2/+2
|
* Merge pull request #10164 from neerajdotname/3002-finalRafael Mendonça França2013-04-104-4/+78
|\ | | | | While merging relations preserve context for joins
| * While merging relations preserve context for joinsJared Armstrong and Neeraj Singh2013-04-104-4/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #3002. Also see #5494. ``` class Comment < ActiveRecord::Base belongs_to :post end class Author < ActiveRecord::Base has_many :posts end class Post < ActiveRecord::Base belongs_to :author has_many :comments end ``` `Comment.joins(:post).merge(Post.joins(:author).merge(Author.where(:name => "Joe Blogs"))).all` would fail with `ActiveRecord::ConfigurationError: Association named 'author' was not found on Comment`. It is failing because `all` is being called on relation which looks like this after all the merging: `{:joins=>[:post, :author], :where=>[#<Arel::Nodes::Equality: ....}`. In this relation all the context that `Post` was joined with `Author` is lost and hence the error that `author` was not found on `Comment`. Ths solution is to build JoinAssociation when two relations with join information are being merged. And later while building the arel use the previously built `JoinAssociation` record in `JoinDependency#graft` to build the right from clause. Thanks to Jared Armstrong (https://github.com/armstrjare) for most of the work. I ported it to make it compatible with new code base.
* | Revert "Merge pull request #10158 from steveklabnik/issue_10125"Rafael Mendonça França2013-04-102-19/+2
| | | | | | | | | | | | | | | | This reverts commit fa3ef8e82ab2f96cf15ef9bc885b2468fad77621, reversing changes made to e0af93dd3a5eeee2e2a67b05f34afb66cc80c00b. Reason: Routes, Active Record and the rendering stack should not depend on the default locale
* | code review of 22e5ab3Xavier Noria2013-04-101-8/+7
| |
* | Merge pull request #10157 from prathamesh-sonpatki/app_loaderXavier Noria2013-04-102-19/+14
|\ \ | | | | | | Searching for rails executable correctly
| * | Searching for rails executable correctlyPrathamesh Sonpatki2013-04-102-19/+14
|/ / | | | | | | | | | | | | | | | | | | * Current logic of finding Rails executable in parent directory is not returning full path of executable if it is found in one of the parent directories * To compensate for this, we have to call exec_app_rails recursively until the executable is found or we cant do 'chdir' anymore * This solution finds the correct executable path from parent directory(s) recursively
* | Merge pull request #10165 from wangjohn/public_send_for_instanceRafael Mendonça França2013-04-101-1/+1
|\ \ | |/ |/| Using public send instead of send for the PerThreadRegistry module.
| * Using public send instead of send for the PerThreadRegistry module.wangjohn2013-04-101-1/+1
|/ | | | Prevents you from accidentally calling a protected method.
* Merge pull request #10162 from choudhuryanupam/fix_activesupport_testCarlos Antonio da Silva2013-04-101-2/+0
|\ | | | | Removed unused setup
| * Removed unused setupAnupam Choudhury2013-04-101-2/+0
|/
* Merge pull request #10160 from choudhuryanupam/fix_typo_n_grammarXavier Noria2013-04-101-1/+1
|\ | | | | Fixed typo
| * Fixed typoAnupam Choudhury2013-04-101-1/+1
|/
* Return nil for Mime::NullType#refAndrew White2013-04-102-1/+5
|
* Reverts rendering behavior when format is unknownGrzegorz Świrski2013-04-102-2/+6
| | | | | | | | | If a request has unknown format (eg. /foo.bar), the renderer fallbacks to default format. This patch reverts Rails 3.2 behavior after c2267db commit. Fixes issue #9654.
* Add failing test case for #9654Andrew White2013-04-101-0/+45
|
* Merge pull request #10158 from steveklabnik/issue_10125Steve Klabnik2013-04-092-2/+19
|\ | | | | Fix inflector to respect default locale.
| * Fix inflector to respect default locale.Nick Cox2013-04-102-2/+19
| | | | | | | | | | | | | | | | The inflector was made aware of locales in 7db0b073fec6bc3e6f213b58c76e7f43fcc2ab97, but it defaulted to :en. That should actually be our default locale instead. Fixes #10125
* | Merge pull request #10156 from wangjohn/grouping_thread_localsJeremy Kemper2013-04-099-19/+92
|\ \ | |/ |/| Grouping thread locals in ActiveRecord
| * Changed the ScopeRegistry and the InstrumentationRegistry to use thewangjohn2013-04-093-13/+12
| | | | | | | | PerThreadRegistry module.
| * Created a runtime registry for thread local variables in active record.wangjohn2013-04-095-6/+39
| |
| * Creating a module so that per thread registries can be easily created aswangjohn2013-04-091-0/+41
|/ | | | thread local variables.
* Explain how to upgrade bin/ for Rails 4Jeremy Kemper2013-04-091-8/+29
|
* Merge pull request #10154 from killthekitten/fix_template_error_headerCarlos Antonio da Silva2013-04-091-1/+1
|\ | | | | Use camelize instead of capitalize on template error screen
| * Use camelize instead of capitalize on error screenNikolay Shebanov2013-04-101-1/+1
| |
* | Merge pull request #10103 from ↵Steve Klabnik2013-04-092-118/+238
|\ \ | |/ |/| | | | | senny/get_action_mailer_guide_ready_for_prime_time Get Action Mailer guide ready for prime time [ci skip]
| * get the Action Mailer guide ready. [ci skip]Yves Senn2013-04-092-118/+238
| |
* | copy-edit pass in AM changelog [ci skip]Xavier Noria2013-04-091-9/+11
| |
* | Merge pull request #9843 from indirect/rails_binRafael Mendonça França2013-04-091-10/+20
|\ \ | | | | | | Rails 4 prints help for "rails new" when running "rails console"
| * | fix binstub typoAndre Arko2013-03-301-1/+1
| | |
| * | need to delete bin, not binstub, update wordingAndre Arko2013-03-271-4/+4
| | |
| * | script/rails could never be from bundlerAndre Arko2013-03-271-1/+1
| | |
| * | rails commands even if bin/rails is a gem stubAndre Arko2013-03-201-10/+20
| | |
* | | Fix typoRafael Mendonça França2013-04-091-2/+2
| | |
* | | Merge pull request #10153 from choudhuryanupam/masterRafael Mendonça França2013-04-091-4/+0
|\ \ \ | | | | | | | | Removed unused setup
| * | | Removed unused setupAnupam Choudhury2013-04-091-4/+0
|/ / /
* | | Merge pull request #10142 from wangjohn/grouping_thread_localsRafael Mendonça França2013-04-092-9/+16
|\ \ \ | | | | | | | | Delegating the value getter and setters in the ScopeRegistry
| * | | Delegating the value getter and setters in the ScopeRegistry to thewangjohn2013-04-082-9/+16
| | | | | | | | | | | | | | | | current ScopeRegister object.
* | | | Merge pull request #10151 from neerajdotname/ar-to-klassRafael Mendonça França2013-04-094-12/+12
|\ \ \ \ | | | | | | | | | | changed variable name active_record => base_klass
| * | | | changed variable name active_record => base_klassNeeraj Singh2013-04-094-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code stores the klass name in active_record and this is used throughout. While reviewing the code time and again I had the mental picture of active_record being an instance of a klass. However here the actual klass is being stored in @active_record. Secondly at two different places while referring to @active_record the comment refers to it as base klass. All this points to active_record being not the best variable name. So I thought it is better to replace active_record with base_klass. This change is confined to JoinDependency, JoinBase, JoinPart and JoinAssociation - all joining related work.
* | | | | Merge pull request #10138 from hbakhtiyor/test-dirs-environmentRafael Mendonça França2013-04-091-2/+3
|\ \ \ \ \ | |/ / / / |/| | | | Add TEST_DIRS enviroment for constrain test directories in rakefile
| * | | | Add TEST_DIRS enviroment for constrain test directories in rakefileAbd ar-Rahman Hamidi2013-04-081-2/+3
| | | | |
* | | | | Merge pull request #10148 from vipulnsward/traces_changeCarlos Antonio da Silva2013-04-091-6/+4
|\ \ \ \ \ | | | | | | | | | | | | change array of array to hash
| * | | | | change array of array to hashVipul A M2013-04-091-6/+4
| | | | | |
* | | | | | Merge pull request #10147 from vipulnsward/fix_AP_live_warningCarlos Antonio da Silva2013-04-082-1/+2
|\ \ \ \ \ \ | |/ / / / / |/| | | | | fix AP warning; remove unused variable
| * | | | | fix AP warning; remove unused variableVipul A M2013-04-092-1/+2
|/ / / / /
* | | | | Merge pull request #10145 from wangjohn/instrumentation_registry_creationRafael Mendonça França2013-04-081-1/+27
|\ \ \ \ \ | | | | | | | | | | | | Consolidating thread locals in AS::Notifications
| * | | | | Creating an object to consolidate thread locals which hold thewangjohn2013-04-081-1/+27
|/ / / / / | | | | | | | | | | | | | | | instrumenters for the AS::Notifications module.
* | | | | Merge pull request #10143 from Agis-/mark_unused_varsRafael Mendonça França2013-04-089-13/+13
|\ \ \ \ \ | |_|/ / / |/| | | | Mark unused variables and make some style fixes
| * | | | Mark unused variables and make some style fixesAgis Anastasopoulos2013-04-089-13/+13
|/ / / / | | | | | | | | | | | | It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.