aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove extra test case.Mike Gehard2012-06-191-7/+4
| | | | Make the test description better reflect what is happening
* Merge pull request #6779 from simonjefford/db-rake-charsetCarlos Antonio da Silva2012-06-199-20/+118
|\ | | | | Refactor db:charset task
| * Refactor db:charset taskSimon Jefford2012-06-199-20/+118
|/ | | | | In a similar vein to Pat's work on create, drop etc, the db:charset task is now a one liner in databases.rake
* Merge pull request #6777 from route/logger_in_metal_testsCarlos Antonio da Silva2012-06-191-0/+17
|\ | | | | | | Added test for case when view doesn't have logger method when using ActionController::Metal controller.
| * Added test for case when view doesn't have logger method when using ↵Dmitry Vorotilin2012-06-191-0/+17
| | | | | | | | ActionController::Metal controller.
* | Merge pull request #6776 from raggi/cache_controlJosé Valim2012-06-182-10/+44
|\ \ | |/ |/| Ensure that cache-control headers are merged
| * Ensure that cache-control headers are mergedJames Tucker2012-06-182-10/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several aspects to this commit, that don't well fit into broken down commits, so they are detailed here: * When a user uses response.headers['Cache-Control'] = some_value, then the documented convention in ConditionalGet is not adhered to, in this case, response.cache_control is ignored due to `return if self[CACHE_CONTROL].present?` * When a middleware sets cache-control headers that would clobber, they're converted to symbols directly, without underscores. This would lead to bugs. * Items that would live in :extras if set through expires_in, are placed directly in the @cache_control hash, and not respected in many cases (somewhat adhering to the aforementioned documentation). * Although quite useless, any directive named 'extras' would be ignored. The general convention applied is that expires_* take precedence, but no longer overwrite everything and expires_* are ALWAYS applied, even if the header is set. I am still unhappy about the contents of this commit, and the code in general. Ideally it should be refactored to no longer use :extras. I'd likely recommend expanding @cache_control into a class, and giving it the power to handle the merge in a more efficient fashion. Such a commit would be a larger change that could have additional semantic changes for other libraries unless they utilize expires_in in very standard ways.
* | Merge branch 'acapilleri-update_nested_attributes'Rafael Mendonça França2012-06-192-5/+25
|\ \ | | | | | | | | | Closes #6675
| * | Refactor the conditionalsRafael Mendonça França2012-06-191-7/+7
| | |
| * | Validates_numericality_of is skipped when changing 0 to to non-empty stringAngelo capilleri2012-06-192-5/+25
|/ / | | | | | | | | | | | | | | | | | | This happens when A has_many many B and A accepts_nested_attributes B that has a numeric colum with initial 0 value. So a.update_attributes({:b_attributes => { :id => b.id, :numeric => 'foo' }}) passes the validation test but, the value of :numeric doesn't change. his commit forces that the update fails with the above conditions. Fixes #6393 Fixes #2331
* | Merge pull request #5412 from tilsammans/stored_attributesCarlos Antonio da Silva2012-06-183-2/+32
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added `stored_attributes` hash which contains the attributes stored using ActiveRecord::Store. This allows you to retrieve the list of attributes you've defined. class User < ActiveRecord::Base store :settings, accessors: [:color, :homepage] end User.stored_attributes[:settings] # [:color, :homepage]
| * | Refactor and use class_attributeCarlos Antonio da Silva2012-06-182-7/+15
| | |
| * | Remember the stored attributes in a config attribute.Joost Baaij2012-06-183-1/+23
|/ / | | | | | | | | | | This allows you to retrieve the list of attributes you've defined. Usable for e.g. selects in the view, or interators based on the attributes you wish to store in the serialized column.
* | Improve the CHANGELOG entry [ci skip]Rafael Mendonça França2012-06-181-2/+19
| |
* | Merge branch 'hash_with_indifferent_access_fix'Carlos Antonio da Silva2012-06-182-1/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem: Accessing a HashWithIndifferentAccess does not return the the same object that is stored in the hash (i.e. equal?) causing unexpected results: hash = HashWithIndifferentAccess.new {|h, k| h[k] = []} hash[:a] << 1 # => [1] hash[:a] # => [], expected [1] The cause: When a block is provided to generate default values the generated values are duped if they are arrays. The duped value is stored in the hash but the original value is returned when the hash is accessed. The fix: The duping is there for allowing frozen arrays containing hashes to be modified. The fix restricts the duping to this case. Note that if default function generates a frozen array an error will be raised on assignment before and after the patch. Closes #3811
| * | Use map! instead of replace + mapCarlos Antonio da Silva2012-06-181-1/+1
| | |
| * | Fix lookup on HashWithIndifferentAccess for array values.Chris Zetter2012-06-182-1/+9
|/ /
* | Refactor Relation#update a bit to avoid an extra Enumerator instanceCarlos Antonio da Silva2012-06-181-1/+1
| |
* | Make DatabaseTasks a module with real private methodsCarlos Antonio da Silva2012-06-181-13/+14
| |
* | Merge pull request #6775 from takoyakikamen/eventsAaron Patterson2012-06-183-11/+42
|\ \ | |/ |/| make events not use date and time to determine parent_of. fixes #5932
| * make events not use date and time to determine parent_of. fixes #5932タコ焼き仮面2012-06-183-11/+42
|/
* Add CHANGELOG entry to composed_of removalRafael Mendonça França2012-06-181-0/+6
|
* Merge pull request #6743 from steveklabnik/remove_composed_ofRafael Mendonça França2012-06-1818-768/+9
|\ | | | | | | Removing composed_of
| * Removing composed_of from ActiveRecord.Steve Klabnik2012-06-1818-768/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature adds a lot of complication to ActiveRecord for dubious value. Let's talk about what it does currently: class Customer < ActiveRecord::Base composed_of :balance, :class_name => "Money", :mapping => %w(balance amount) end Instead, you can do something like this: def balance @balance ||= Money.new(value, currency) end def balance=(balance) self[:value] = balance.value self[:currency] = balance.currency @balance = balance end Since that's fairly easy code to write, and doesn't need anything extra from the framework, if you use composed_of today, you'll have to add accessors/mutators like that. Closes #1436 Closes #2084 Closes #3807
* | Merge pull request #6772 from yahonda/reset_sequence_name_oracleRafael Mendonça França2012-06-181-0/+2
|\ \ | |/ |/| ORA-02289: sequence does not exist for `SELECT "BLACK_JOKES_SEQ".NEXTVAL FROM dual`
| * Add ensure Joke.reset_sequence_nameYasuo Honda2012-06-191-0/+2
|/ | | | | to avoid ORA-02289: sequence does not exist for `SELECT "BLACK_JOKES_SEQ".NEXTVAL FROM dual`
* Merge branch 'eliminate_notice_messages'Carlos Antonio da Silva2012-06-185-5/+15
|\ | | | | | | Closes #6754
| * Change minimum (default) log level in PostgreSQL to warning.kennyj2012-06-185-5/+15
|/
* Require thor 0.15.3 onwardsJosé Valim2012-06-182-5/+2
|
* Merge branch 'dp_docs'Carlos Antonio da Silva2012-06-181-0/+92
|\ | | | | | | Closes #6697
| * Documentation for where and where! methods on relations.David Paschich2012-06-181-0/+92
| | | | | | | | Based on examples seen in the Rails test suite. [ci skip]
* | Merge pull request #6767 from frodsan/fix_sqlite_rake_testsRafael Mendonça França2012-06-174-6/+9
|\ \ | | | | | | fix invalid syntax and sqlite rake failing tests
| * | fix invalid syntax and sqlite rake failing testsFrancesco Rodriguez2012-06-184-6/+9
|/ /
* | Merge pull request #6766 from frodsan/refactor_db_tasksRafael Mendonça França2012-06-174-208/+226
|\ \ | | | | | | add :nodoc: to AR::Tasks and update to follow the coding conventions
| * | add :nodoc: to AR::Tasks and update to follow the coding conventionsFrancesco Rodriguez2012-06-184-208/+226
|/ /
* | Merge pull request #6765 from frodsan/fix_build_railtiesRafael Mendonça França2012-06-171-3/+3
|\ \ | | | | | | Fix build: check if sqlite3 file exists before remove
| * | check if sqlite3 file exists before removeFrancesco Rodriguez2012-06-181-3/+3
|/ /
* | Merge pull request #6761 from freelancing-god/db-rakeJon Leighton2012-06-1710-156/+983
|\ \ | | | | | | Get logic out of db rake tasks, and into classes and objects
| * | Rails is the default (but now override able) source for environment and path.Pat Allan2012-06-174-43/+57
| | |
| * | Cleaning up after some warnings, adding slightly higher-level tests.Pat Allan2012-06-176-9/+309
| | |
| * | One line db:create/db:drop tasks.Pat Allan2012-06-172-55/+50
| | | | | | | | | | | | | | | | | | Now isn't that better? And yes, I know that private has no impact on class methods - it's a visual distinction, not a technical one.
| * | db:drop and some of db:test:purge.Pat Allan2012-06-178-52/+243
| | |
| * | db:create for PostgreSQL pulled out into a class.Pat Allan2012-06-176-36/+99
| | |
| * | db:create for MySQL now much cleaner.Pat Allan2012-06-176-37/+230
| | |
| * | Confirm connection is not established if file exists.Pat Allan2012-06-171-1/+10
| | |
| * | A beginning of sorts.Pat Allan2012-06-174-12/+74
| | | | | | | | | | | | Minimal implementation that supports db:create SQLite replacement
* | | Merge pull request #6762 from frodsan/patch-3José Valim2012-06-171-2/+2
|\ \ \ | | | | | | | | bump AS deprecation_horizon to 4.1
| * | | bump AS deprecation_horizon to 4.1Francesco Rodríguez2012-06-171-2/+2
|/ / /
* | | Merge pull request #6760 from kennyj/bump_20120617Santiago Pastorino2012-06-172-2/+2
|\ \ \ | | | | | | | | Bump tzinfo gem.
| * | | Bump tzinfo gem.kennyj2012-06-172-2/+2
| | | |