aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2116 from guilleiguaran/fix-environment-generator-actionSantiago Pastorino2011-07-182-2/+10
|\ | | | | Fix Rails::Generators::Actions#environment when env is passed
| * Fix Rails::Generators::Actions#environment when env is passed. Closes #2110Guillermo Iguaran2011-07-182-2/+10
| |
* | Merge pull request #195 from bigfix/active_model_include_serializationJosé Valim2011-07-188-241/+343
|\ \ | | | | | | ActiveModel support for the :include serialization option
| * | ActiveModel support for the :include serialization optionJohn Firebaugh2011-07-176-90/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves support for the :include serialization option for serializing associated objects out of ActiveRecord in into ActiveModel. The following methods support the :include option: * serializable_hash * to_json * to_xml Instances must respond to methods named by the values of the :includes array (or keys of the :includes hash). If an association method returns an object that is_a?(Enumerable) (which AR has_many associations do), it is assumed to be a collection association, and its elements must respond to :serializable_hash. Otherwise it must respond to :serializable_hash itself. While here, fix #858, XmlSerializer should not singularize already singular association names.
| * | Move to_xml tests to xml_serialization_test.rbJohn Firebaugh2011-07-172-143/+133
| | | | | | | | | | | | | | | One duplicate was eliminated: test_to_xml_including_methods/ test_methods_are_called_on_object.
| * | We already have the record; no need to retrieve it againJohn Firebaugh2011-07-171-2/+2
| | |
| * | Replace map+compact with selectJohn Firebaugh2011-07-171-1/+1
| | |
| * | Add a testJohn Firebaugh2011-07-171-0/+5
| | |
| * | serializable_hash(:only => [], :methods => [:foo]) should workJohn Firebaugh2011-07-172-7/+14
| | |
* | | Merge pull request #2075 from lawrencepit/match_attribute_methodJosé Valim2011-07-181-6/+27
|\ \ \ | | | | | | | | Optimization of ActiveModel's match_attribute_method?
| * | | Made attribute_method_matchers_cache private + docLawrence Pit2011-07-171-3/+13
| | | |
| * | | Issue #2075 Optimization of ActiveModel's match_attribute_method?Lawrence Pit2011-07-161-9/+17
| | | |
| * | | Optimization of ActiveModel's match_attribute_method?Lawrence Pit2011-07-151-2/+5
| | | |
* | | | Merge pull request #2128 from sikachu/master-dynamic_finderJon Leighton2011-07-184-16/+49
|\ \ \ \ | | | | | | | | | | Raise an ArgumentError if user passing less number of argument in the dynamic finder
| * | | | Refactor test case to use anonymous class - Thank you @tenderlovePrem Sichanugrist2011-07-181-13/+8
| | | | |
| * | | | Refactor the code a bit to reduce the duplicationPrem Sichanugrist2011-07-171-17/+8
| | | | |
| * | | | Raise an ArgumentError if user passing less number of argument in the ↵Prem Sichanugrist2011-07-174-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dynamic finder The previous behavior was unintentional, and some people was relying on it. Now the dynamic finder will always expecting the number of arguments to be equal or greater (so you can still pass the options to it.) So if you were doing this and expecting the second argument to be nil: User.find_by_username_and_group("sikachu") You'll now get `ArgumentError: wrong number of arguments (1 for 2).` You'll then have to do this: User.find_by_username_and_group("sikachu", nil)
* | | | | make tzinfo a development dependencyAaron Patterson2011-07-181-1/+2
| | | | |
* | | | | Merge pull request #2124 from arunagw/render_partial_invalid_check_fixSantiago Pastorino2011-07-171-2/+1
|\ \ \ \ \ | | | | | | | | | | | | Checking with to_s. As regexp fail with 1.8.7
| * | | | | Checking with to_s. As regexp fail with 1.8.7Arun Agrawal2011-07-181-2/+1
| |/ / / /
* / / / / Don't do remove_possible_method when delegate is used. Two reasons: 1) ↵Jon Leighton2011-07-182-5/+2
|/ / / / | | | | | | | | | | | | warnings should be shown, and fixed at the source and 2) the code is slow. Fixes #1937.
* | | | Merge pull request #2046 from sikachu/master-test_fixSantiago Pastorino2011-07-171-2/+6
|\ \ \ \ | | | | | | | | | | Fix a wrong assertion on url_helper_test, and add missing `#html_safe?` a
| * | | | Fix a wrong assertion on url_helper_test, and refactor `html_safe` test to ↵Prem Sichanugrist2011-07-171-2/+6
| | |/ / | |/| | | | | | | | | | be in its method
* | | | Merge pull request #2018 from bhus/render_partial_invalid_checkSantiago Pastorino2011-07-173-0/+16
|\ \ \ \ | | | | | | | | | | Render partial invalid check
| * | | | Added view template invalid name check, along with tests. No merges in commit.huskins2011-07-133-0/+16
| | | | |
* | | | | Revert "Fix failure in test_preserves_existing_fixture_data from ↵Jon Leighton2011-07-171-2/+2
| |/ / / |/| | | | | | | | | | | | | | | | | | | test/cases/fixtures_test.rb when UTC and local time occur on different dates." I am pretty sure this was an incorrect fix, and it still failed in certain circumstances anyway. I am now unable to reproduce the original failure I was experiencing so will leave it for now and see if this pops up again. This reverts commit e4479b2f1bc54edf155408d51dd3236955150ce1.
* | | | Merge pull request #2118 from arunagw/fix_plugin_gen_testSantiago Pastorino2011-07-171-1/+1
|\ \ \ \ | |_|_|/ |/| | | As we are adding db folder in it. Required in test also.
| * | | As we are adding db folder in it. Required in test also.Arun Agrawal2011-07-171-1/+1
|/ / /
* | | indeed, if we are going to remove everything in public/assets on ↵Xavier Noria2011-07-171-4/+1
| | | | | | | | | | | | assets:clean, just do that
* | | if we are cleaning all files, we are cleaning all gz filesXavier Noria2011-07-171-1/+0
| | |
* | | Merge pull request #2082 from htanata/rake_routes_formattingSantiago Pastorino2011-07-164-15/+107
|\ \ \ | | | | | | | | Better formatting of rake routes (issue #1991)
| * | | Improve formatting of route to Rack application in rake routes.Hendy Tanata2011-07-172-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This route: match 'foo/:id' => RackApp, :id => /[A-Z]\d{5}/ is shown as: /foo/:id(.:format) RackApp {:id=>/[A-Z]\d{5}/}
| * | | Better formatting of route requirements in rake:routes.Hendy Tanata2011-07-164-14/+85
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Previously it was: {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/} Now it becomes: photos#show {:id=>/[A-Z]\d{5}/}
* | | Merge pull request #2108 from loz/masterSantiago Pastorino2011-07-161-0/+5
|\ \ \ | | | | | | | | Adds gem helper rake tasks to engines generator
| * | | Added gem helper to rake task for engines, as per pull request from ↵Jonathan Lozinski2011-07-161-0/+5
| | | | | | | | | | | | | | | | 3-1-stable, #2103
* | | | Fix the output a bitSantiago Pastorino2011-07-161-2/+2
| | | |
* | | | Merge pull request #2101 from loz/masterJosé Valim2011-07-161-1/+1
|\| | | | | | | | | | | Added db to gemspec so migrations are packaged
| * | | Added db to gemspec files so migrations are correctly packagedJonathan Lozinski2011-07-161-1/+1
| |/ /
* | | Merge pull request #2090 from htanata/fix_wildcard_route_code_in_changelogSantiago Pastorino2011-07-151-2/+2
|\ \ \ | |/ / |/| | Fix wildcard route code example in changelog
| * | Fix wildcard route code example in changelog.Hendy Tanata2011-07-161-2/+2
|/ /
* | Merge pull request #2073 from bfolkens/masterSantiago Pastorino2011-07-141-0/+5
|\ \ | | | | | | ported test from pull request #2071 to master
| * | assert nothing raised for setting a cookie value to nil in ActionDispatchBradford Folkens2011-07-141-0/+5
| | |
* | | Merge pull request #2063 from elight/masterSantiago Pastorino2011-07-142-3/+29
|\ \ \ | | | | | | | | Patch for https://github.com/rails/rails/issues/2059
| * | | Fix and unit test for https://github.com/rails/rails/issues/2059Evan Light2011-07-142-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cache key was incorrectly using timezone-dependent record#updated_at when it should be using a timezone-independent value to generate the cache key Minor refactoring to cache_key timezone test Closes #2059 Adds a test to validate the format of the cache_key for nil and present updated_at values Correctly handles updated_at == nil
* | | | Merge pull request #1807 from caius/find_in_batches_id_bugSantiago Pastorino2011-07-142-2/+21
|\ \ \ \ | |_|/ / |/| | | Bugfix by stopping find_in_batches using the records after yielding.
| * | | Stop find_in_batches using the records after yielding.Caius Durling2011-06-212-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | Currently if the code that calls .find_in_batches modifies the yielded array in place then .find_in_batches can enter an infinite loop searching with ruby object ids in the database instead of the primary key of records in the database. This happens because it naively assumes the yielded array hasn't been modified before calling #id on the last object in the array. And ruby (1.8 at least) alias' #id to #object_id so an integer is still returned no matter what the last object is. By moving finding the #id of the last object before yielding the array it means the calling code can do whatever it wants to the array in terms of modifying it in place, and .find_in_batches doesn't care.
* | | | Merge pull request #2066 from amatsuda/magicomeAaron Patterson2011-07-142-0/+4
|\ \ \ \ | |_|/ / |/| | | missing magic comments
| * | | need magic commentsAkira Matsuda2011-07-142-0/+4
|/ / /
* | | Merge pull request #2052 from amatsuda/fullwidth_blankAaron Patterson2011-07-132-2/+6
|\ \ \ | | | | | | | | treat fullwidth whitespace as a blank character
| * | | treat fullwidth whitespace as a blank characterAkira Matsuda2011-07-142-2/+6
| | |/ | |/|