aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Extend assets cache store section in Assets Pipeline Guide [ci skip]Andrey Vakarev2012-06-161-3/+18
| |
| * Add rdoc to phone_field Gaurish Sharma2012-06-161-0/+1
| | | | | | [API docs](http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-phone_field) for `phone_field` provide no information on what the method actually does. no description nor access to source code. so added this
| * add example to ActiveModel::Validations#validators [ci skip]Francesco Rodriguez2012-06-152-3/+15
| |
| * included another upgrading pinfall - accidentally having duplicate js filesCasey Watts2012-06-151-2/+8
| |
* | Merge pull request #6800 from mschneider/dynamic_finders_for_aliased_attributesRafael Mendonça França2012-06-227-2/+27
|\ \ | | | | | | Dynamic finders for aliased attributes
| * | made dynamic finders alias_attribute awareMaximilian Schneider2012-06-227-2/+27
| | | | | | | | | | | | | | | previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute
* | | Fix changelog typo [ci skip]Carlos Antonio da Silva2012-06-221-1/+1
| | |
* | | Merge branch 'pluck-multiple-columns'Carlos Antonio da Silva2012-06-224-28/+76
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow ActiveRecord::Relation#pluck to accept multiple columns. Returns an array of arrays containing the type casted values: Person.pluck(:id, :name) # SELECT people.id, people.name FROM people # [[1, 'David'], [2, 'Jeremy'], [3, 'Jose']] Closes #6500
| * | | Add changelog entry and guide updates for pluck with multiple columnsCarlos Antonio da Silva2012-06-223-6/+26
| | | |
| * | | Refactor pluck with multiple columnsCarlos Antonio da Silva2012-06-222-36/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure it works with mix of symbols and strings, and with a select clause possibly containing more than one column. Also remove support for pluck with an array of columns, in favor of passing the list of attributes: Model.pluck(:a, :b) See comments: https://github.com/rails/rails/pull/6500#issuecomment-6030292
| * | | ActiveRecord#pluck now accepts multiple columnsjeroeningen2012-06-222-16/+51
|/ / /
* | | Fix serializable_hash with xml generation and default :except optionCarlos Antonio da Silva2012-06-223-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating xml with a custom implementation of serializable_hash, if using the :except option, it was being overriden by the default AR implementation that attempts to ignore the inheritance column from STI automatically. So, if you have an implementation like this: def serializable_hash(options={}) super({ except: %w(some_attr) }.merge!(options)) end The :except option was correctly being used for :json generation, but not for :xml, because the options hash already contained the :except key with the inheritance column, thus overriding the customization. This commit fixes this problem by removing the :except logic from the xml serializer, that happened before calling serializable_hash. Since serializable_hash also does the same check for inheritance column, this logic was duplicated in both places, thus it's safe to remove it from xml serializer (see ActiveRecord::Serialization#serializable_hash). This is an attempt to solve issue #2498, that claims for a "Single transformation API for both xml and json representations".
* | | Add some coverage for AR serialization with serializable_hashCarlos Antonio da Silva2012-06-224-27/+114
| | | | | | | | | | | | | | | | | | ActiveRecord json/xml serialization should use as base serializable_hash, provided by ActiveModel. Add some more coverage around options :only and :except for both json and xml serialization.
* | | disallow mutating a relation once loadedJon Leighton2012-06-223-18/+50
| | |
* | | It's AR::Reflection not AR::RelationAndrew White2012-06-221-1/+1
| | |
* | | Improve the derivation of HABTM assocation join table namesAndrew White2012-06-2213-52/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the derivation of HABTM join table name to take account of nesting. It now takes the table names of the two models, sorts them lexically and then joins them, stripping any common prefix from the second table name. Some examples: Top level models (Category <=> Product) Old: categories_products New: categories_products Top level models with a global table_name_prefix (Category <=> Product) Old: site_categories_products New: site_categories_products Nested models in a module without a table_name_prefix method (Admin::Category <=> Admin::Product) Old: categories_products New: categories_products Nested models in a module with a table_name_prefix method (Admin::Category <=> Admin::Product) Old: categories_products New: admin_categories_products Nested models in a parent model (Catalog::Category <=> Catalog::Product) Old: categories_products New: catalog_categories_products Nested models in different parent models (Catalog::Category <=> Content::Page) Old: categories_pages New: catalog_categories_content_pages Also as part of this commit the validity checks for HABTM assocations have been moved to ActiveRecord::Reflection One side effect of this is to move when the exceptions are raised from the point of declaration to when the association is built. This is consistant with other association validity checks.
* | | Set the hash value directly instead of using merge!Carlos Antonio da Silva2012-06-211-1/+1
| | |
* | | Merge pull request #6818 from frodsan/add_nodoc_instancemethodRafael Mendonça França2012-06-211-1/+1
|\ \ \ | | | | | | | | add :nodoc: to AM::AttributeMethods#instance_method_already_implemented?...
| * | | add :nodoc: to AM::AttributeMethods#instance_method_already_implemented? [ci ↵Francesco Rodriguez2012-06-211-1/+1
|/ / / | | | | | | | | | skip]
* | | use mutex_m rather than use a delegate systemAaron Patterson2012-06-211-6/+3
| | |
* | | Merge pull request #6428 from pinetops/resolver_concurrency_fixYehuda Katz2012-06-212-23/+80
|\ \ \ | | | | | | | | Make the Resolver template cache threadsafe
| * | | Improve the readability of the Resolver change detection codeTom Clarke2012-05-221-11/+19
| | | |
| * | | More granular locking of the Resolver template cacheTom Clarke2012-05-211-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to avoid holding a global lock when doing template resolution, instead add individual locks on a per cache entry basis. The global lock is now only used for manipulation of the main cache data structure.
| * | | Make the Resolver template cache threadsafe - closes #6404Tom Clarke2012-05-212-23/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Template cache in the Resolver can be accessed by multiple threads similtaneously in multi-threaded environments. The cache is implemented using a Hash, which isn't threadsafe in all VMs (notably JRuby). This commit extracts the cache to a new Cache class and adds mutexes to prevent concurrent access.
* | | | Merge pull request #6815 from frodsan/add_nodoc_attrmethodmatcherRafael Mendonça França2012-06-211-1/+1
|\ \ \ \ | | | | | | | | | | add :nodoc: to AM::AttributeMethods::AttributeMethodMatcher
| * | | | add :nodoc: to AM::AttributeMethods::AttributeMethodMatcher [ci skip]Francesco Rodriguez2012-06-211-1/+1
| | | | |
* | | | | stop subclassing stringAaron Patterson2012-06-212-4/+11
|/ / / /
* | | | Merge pull request #6804 from acapilleri/firm_changes_from_zero_to_stringCarlos Antonio da Silva2012-06-211-2/+2
|\ \ \ \ | | | | | | | | | | changed the firm of changes_from_zero_to_string?
| * | | | changed the firm of changes_from_zero_to_string?Angelo capilleri2012-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | delete *column* because is unused by the method.
* | | | | Merge pull request #6806 from chancancode/add_test_singularize_of_irregularityCarlos Antonio da Silva2012-06-212-0/+12
|\ \ \ \ \ | | | | | | | | | | | | Inflector: Added missing tests cases to ensure idempotency of singularize and pluralize
| * | | | | Adds missing inflector tests to ensure idempotencyGodfrey Chan2012-06-212-0/+12
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up to #4719. It appears that singularize and pluralize are supposed to be idempotent - i.e. when you call singularize or pluralize multiple times on the same string, you should get the same result. (At least for the "officially supported" cases that the stock inflector is designed to handle.) #4719 added the missing tests for regular cases, and this commit added the missing tests for the irregularities. While I'm at that, I also synced up the irregularity test cases with the current set of irregularity cases that we ship out-of-the-box.
* | | | | Merge pull request #6808 from arunagw/warning_removed_actionpackCarlos Antonio da Silva2012-06-211-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | Removed warnings.
| * | | | Removed warnings.Arun Agrawal2012-06-211-3/+3
|/ / / / | | | | | | | | | | | | | | | | 1. Change in test name as already defined. 2. ambiguous first argument; put parentheses or even spaces
* | | | logger is a singleton, just flush the singletonAaron Patterson2012-06-201-11/+1
| | | |
* | | | explain listener does not care about time, so use evented listenerAaron Patterson2012-06-202-7/+10
| | | |
* | | | use thread local queues.Aaron Patterson2012-06-201-4/+10
| | | | | | | | | | | | | | | | | | | | Log listener is a singleton shared across threads, so make sure the event queues are local to each thread.
* | | | Merge pull request #6801 from dmathieu/mailer_raise_if_no_implicit_templateRafael Mendonça França2012-06-2011-3/+30
|\ \ \ \ | | | | | | | | | | Mailer with no implicit template
| * | | | raise an error if no implicit mailer template could be foundDamien Mathieu2012-06-2011-3/+30
|/ / / /
* | | | Merge pull request #6799 from kennyj/refactor_long_codesRafael Mendonça França2012-06-201-132/+38
|\ \ \ \ | |_|/ / |/| | | Refactor testcase codes. It's repeated.
| * | | Refactor testcase codes. It's repeated.kennyj2012-06-211-132/+38
|/ / /
* | | Merge pull request #6798 from kennyj/db-rake-structure-loadCarlos Antonio da Silva2012-06-209-53/+133
|\ \ \ | | | | | | | | Refactor db:structure:load task.
| * | | Remove duplicated codes.kennyj2012-06-211-41/+11
| | | |
| * | | Refactor db:structure:load task.kennyj2012-06-219-19/+129
| | | |
* | | | Merge pull request #4396 from kennyj/fix_4259Rafael Mendonça França2012-06-202-4/+40
|\ \ \ \ | |/ / / |/| | | | | | | Fix GH #4259. When we execute schema dumper, we must remove table_name_prefix and table_name_suffix.
| * | | Fix GH #4259. We must remove table_name_prefix and table_name_suffix, when ↵kennyj2012-01-102-4/+40
| | | | | | | | | | | | | | | | we execute schema dumper.
* | | | Merge pull request #6402 from paranoiase/prev-and-next-quarterCarlos Antonio da Silva2012-06-2012-2/+91
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add prev_quarter and next_quarter methods in Time/Date/DateTime calculations. Similar to prev_month and next_month, it returns the date with the same day in the previous or next quarter: t = Time.local(2010, 5, 8) # => Sat, 08 May 2010 t.prev_quarter # => Mon, 08 Feb 2010 t.next_quarter # => Sun, 08 Aug 2010 Closes #6402
| * | | | Add prev_quarter and next_quarter method in Time/Date/DateTimeparanoiase Kang2012-06-207-0/+82
| | | | |
| * | | | Merge pull request #6426 from pinetops/template_concurrency_masterCarlos Antonio da Silva2012-06-200-0/+0
| |\ \ \ \ | | | | | | | | | | | | Prevent concurrent compilation of templates - closes #6400
| | * | | | Prevent concurrent compilation of templates - closes #6400Tom Clarke2012-05-211-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses an issue where in multi-threaded environments multiple threads can attempt to compile a template at the same time, which occasionally causes particular templates to end up in a bad state. So, add synchronization such that only a single thread can attempt to compile a template at one time.
| * | | | | Bump minitest to 3.1.0Santiago Pastorino2012-06-201-1/+1
| | | | | |